|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
D - bug: std.date.toDateString()? std.date.getUTCtime()?
This code:
import std.c.stdio, std.date;
void main() {
char [] fecha= toDateString(getUTCtime());
printf("%.*s\n",fecha);
}
Produces this output: "Error: Switch Default date(609)". Am I missing
something? (dmd 0.76 for win)
-----------------------
Carlos Santander Bernal
---
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.552 / Virus Database: 344 - Release Date: 2003-12-15
Dec 16 2003
According to MSDN, http://msdn.microsoft.com/library/en-us/sysinfo/ base/gettimezoneinformation.asp GetTimeZoneInformation() API returns TIME_ZONE_ID_UNKNOWN if daylight saving time is not used in the current time zone. Maybe this case should not be treated as an error... Kaz. Dec 17 2003
"k.inaba" <k.inaba_member pathlink.com> wrote in message news:brpca9$1ql3$1 digitaldaemon.com...According to MSDN, http://msdn.microsoft.com/library/en-us/sysinfo/ Mar 22 2004
"Walter" <walter digitalmars.com> wrote in message news:brot1l$13g5$1 digitaldaemon.com... | It works fine when I try it ... | | Can somebody else confirm this? ----------------------- Carlos Santander Bernal --- Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.552 / Virus Database: 344 - Release Date: 2003-12-15 Dec 17 2003
"Carlos Santander B." <carlos8294 msn.com> wrote in message news:brr3nh$1brv$1 digitaldaemon.com..."Walter" <walter digitalmars.com> wrote in message news:brot1l$13g5$1 digitaldaemon.com... | It works fine when I try it ... | | Can somebody else confirm this? Dec 17 2003
"Andrew Edwards" <edwardsac spamfreeusa.com> wrote in message news:brr4i3$1d2r$1 digitaldaemon.com... | Works for me! (WinXP) | | However, changing the TimeZone wield the following error for Osaka Japan, | West Central Africa, Monrovia, and many others: | | Error: Switch Default date(609) | | Andrew | | I have it under Bogotá, Quito, Lima (GMT-5). Maybe that's the reason. ----------------------- Carlos Santander Bernal --- Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.552 / Virus Database: 344 - Release Date: 2003-12-15 Dec 17 2003
"Carlos Santander B." <carlos8294 msn.com> wrote in message news:brr4o7$1d8r$1 digitaldaemon.com..."Andrew Edwards" <edwardsac spamfreeusa.com> wrote in message news:brr4i3$1d2r$1 digitaldaemon.com... | Works for me! (WinXP) | | However, changing the TimeZone wield the following error for Osaka Dec 17 2003
"Andrew Edwards" <edwardsac spamfreeusa.com> wrote in Dec 17 2003
"Andrew Edwards" <edwardsac spamfreeusa.com> wrote in message news:brr582$1e4e$1 digitaldaemon.com... | Results in previous error! Try NewYork and see the result! | | Yes, NY works, but I want to have my comp properly configured ;). Oddly, Indiana doesn't work either (Indiana is more appropiate for me: there's no day light saving hour). Anyway, it's obviously a bug. ----------------------- Carlos Santander Bernal --- Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.552 / Virus Database: 344 - Release Date: 2003-12-15 Dec 17 2003
"Carlos Santander B." <carlos8294 msn.com> wrote in message
news:bro9ca$51u$1 digitaldaemon.com...
| This code:
|
| import std.c.stdio, std.date;
| void main() {
| char [] fecha= toDateString(getUTCtime());
| printf("%.*s\n",fecha);
| }
|
| Produces this output: "Error: Switch Default date(609)". Am I missing
| something? (dmd 0.76 for win)
|
| -----------------------
| Carlos Santander Bernal
|
The same, under Linux (dmd 0.76), outputs:
Tue Dec 09 1969
(and this is *so* wrong, because I ran 'date' and I got: mié dic 17 21:22:51
ECT 2003, so something is wrong)
Also, a small suggestion: (when this is fixed) can we have a toString(d_time
time,char [] format) so we can specify the kind of output we want?
-----------------------
Carlos Santander Bernal
---
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.552 / Virus Database: 344 - Release Date: 2003-12-15
Dec 17 2003
|