get current time and convert it to string
Derek Parnell
derek at psych.ward
Wed Apr 26 17:36:14 PDT 2006
On Wed, 26 Apr 2006 21:58:48 +0200, Abby (J.P.) wrote:
> By the way, is there a way to set the time shifting used for the function
> std.date.UTCtoLocalTime(long t); ?
> It does automatically put me at GMT+4, and that's not valid.
This is an undocumented 'feature' of std.date.
To set the local time zone you must set the public variable in std.date.
For example, to set the time zone to -4 hours from UTC...
std.date.LocalTZA = -4 * msPerHour;
To get the local time zone as defined in your system's parameters ...
d_time realLTZ = std.date.getLocalTZA();
--
Derek
(skype: derek.j.parnell)
Melbourne, Australia
"Down with mediocracy!"
27/04/2006 10:33:20 AM
More information about the Digitalmars-d-learn
mailing list