Jump to page: 1 2
Thread overview
bug: std.date.toDateString()? std.date.getUTCtime()?
Re: std.date.toDateString()? std.date.getUTCtime()?
Dec 17, 2003
Walter
Dec 17, 2003
k.inaba
Mar 22, 2004
Walter
Dec 18, 2003
Andrew Edwards
Dec 18, 2003
Andrew Edwards
Dec 18, 2003
Andrew Edwards
December 17, 2003
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


December 17, 2003
It works fine when I try it ...


December 17, 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.
December 18, 2003
"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


December 18, 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


December 18, 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?
>

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


December 18, 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


December 18, 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
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
>
>
Results in previous error! Try NewYork and see the result!


December 18, 2003
"Andrew Edwards" <edwardsac@spamfreeusa.com> wrote in
> >
> Results in previous error! Try NewYork and see the result!
>
>

Sorry, I meant Eastern Time (GMT-5) right below Bogota.


December 18, 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


« First   ‹ Prev
1 2