1

When I retrieve response from query http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=getaccountdetails_v1&type=prem&login=MY_USERNAME&password=MY_PASSWORD, among other variables, I get .............. validuntil=1251783433.........., which should tell me the exact expiration date. My question is how to convert this integer to normal date time format.

2 Answers2

2

That number (1251783433) is known as Unix time. Most programming languages have methods to convert from Unix time to a date/time format.

jimyi
  • 30,733
  • 3
  • 38
  • 34
1

The value is probably the Unix timestamp representation of the date. You can test the value here.

1251783433
GMT: Tue, 01 Sep 2009 05:37:13 GMT

Check the documentation of the programming language you are using to know to create a new Time instance from timestamp.

For instance, in PHP you can format a timestamp with the date() function.

// prints something like: Tue, 01 Sep 2009 05:37:13 GMT
echo date(DATE_RFC822, 1251783433);
Simone Carletti
  • 173,507
  • 49
  • 363
  • 364