You understand that this is just a UNIX timestamp right?....
|
I need to figure out how to translate this value from a vBulletin Expiry date:
Into something that can be used to give off a date in java.Code:1363737060
Subscriptions.php does this:
Code:$expirydate = vbmktime($vbulletin->GPC['expirydate']['hour']
You understand that this is just a UNIX timestamp right?....
Multiply by 1000, because java.util.Date uses milliseconds, not seconds.
Working example:
Code:import java.util.Date; class Main { public static void main (String[] args) { long timestamp = 1363737000; Date time = new Date(timestamp * 1000); System.out.println(time.toLocaleString()); } }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |