std.datetime: Getting unix time from 1970

Mandeep mandeep at brars.co.in
Mon Apr 25 11:21:06 PDT 2011


I am trying to get the number of seconds from 1970 using the 
std.datetime module.

long val = SysTime(Date(1996, 1, 1)).toUnixTime()

Shouldnt the above statement give me a Timezone independent result i.e. 
'toUnixTime'.

Also, is there a method to get seconds directly from Date and DateTime 
instead of creating SysTime.

Regards
Mandeep


More information about the Digitalmars-d-learn mailing list