std.date again
Carlos Santander
csantander619 at gmail.com
Mon May 8 18:42:09 PDT 2006
Here it's again:
//------------------------
import std.date;
import std.stdio;
void main()
{
writefln("UTC :%s", toTimeString(getUTCtime()));
writefln("Local:%s", toTimeString(UTCtoLocalTime(getUTCtime())));
}
//------------------------
:::: gdc 0.17, Mac OS X 10.4.6
$ ./test
UTC :06:20:52 GMT+0500
Local:11:20:52 GMT+0500
$ date
Mon May 8 20:21:01 ECT 2006
:::: DMD 0.155, Windows XP SP 2
D:\>test
UTC :01:27:19 GMT+0000
Local:01:27:19 GMT+0000
D:\>time
La hora actual es: 20:27:32,08
:::: DMD 0.155, Mandrake Linux 10.1
$ ./test
UTC :20:34:23 GMT-0500
Local:15:34:23 GMT-0500
$ date
lun may 8 20:34:27 ECT 2006
Walter, at least take a look at UTC on Linux: that's the correct local time,
which most certainly gives a clue of where the solution might be.
In all my systems, the timezone is GMT -0500 aka Bogotá, Lima, Quito, aka ECT.
--
Carlos Santander Bernal
More information about the D.gnu
mailing list