Jump to page: 1 2
Thread overview
problem with std.date
Mar 16, 2004
Ant
Mar 16, 2004
Matthew
Mar 16, 2004
Julio Jiménez
Mar 17, 2004
J C Calvarese
Mar 17, 2004
Phill
Mar 17, 2004
Phill
Mar 18, 2004
J C Calvarese
Mar 22, 2004
Walter
March 16, 2004
If I do date from the command  prompt:
$ date
Tue Mar 16 10:19:51 EST 2004

If I do it from D:
date = Sat Jan 17 03:39:50 GMT-0500 1970

Is anybody using std.date at all?
(or std.zip?)

Ant
##########################
import std.date;

void main()
{
	printf("date = %.*s\n", std.date.toString(getUTCtime()));
}


March 16, 2004
Am currently interested in both of these. For the moment I've been hacking Win32 date functions in D, and spawning WinZips cmd-line tool, as am pressed for time.

I'd be interested in hearing of any serious exercising of the std.date stuff.



"Ant" <duitoolkit@yahoo.ca> wrote in message news:pan.2004.03.16.15.23.49.369090@yahoo.ca...
> If I do date from the command  prompt:
> $ date
> Tue Mar 16 10:19:51 EST 2004
>
> If I do it from D:
> date = Sat Jan 17 03:39:50 GMT-0500 1970
>
> Is anybody using std.date at all?
> (or std.zip?)
>
> Ant
> ##########################
> import std.date;
>
> void main()
> {
> printf("date = %.*s\n", std.date.toString(getUTCtime()));
> }
>
>


March 16, 2004
Ant wrote:
> If I do date from the command  prompt:
> $ date
> Tue Mar 16 10:19:51 EST 2004
> 
> If I do it from D:
> date = Sat Jan 17 03:39:50 GMT-0500 1970
> 
> Is anybody using std.date at all?
> (or std.zip?)
> 
> Ant
> ##########################
> import std.date;
> 
> void main()
> {
> 	printf("date = %.*s\n", std.date.toString(getUTCtime()));
> }
> 	
> 	
I watch that problem when trying to set date and time to files in zip.... :)

weird!


March 17, 2004
Ant wrote:
> If I do date from the command  prompt:
> $ date
> Tue Mar 16 10:19:51 EST 2004
> 
> If I do it from D:
> date = Sat Jan 17 03:39:50 GMT-0500 1970
> 
> Is anybody using std.date at all?
> (or std.zip?)
> 
> Ant
> ##########################
> import std.date;
> 
> void main()
> {
> 	printf("date = %.*s\n", std.date.toString(getUTCtime()));
> }

The "version (Win32)" section seems ok. Your example seems to work fine on my computer (WindowsXP).

@echo off
date /t
time /t
dmd std_date.d
std_date.exe
pause

Tue 03/16/2004
09:43 PM
d:\dmd\bin\..\..\dm\bin\link.exe std_date,,,user32+kernel32/noi;
date = Tue Mar 16 21:43:30 GMT-0600 2004

-- 
Justin
http://jcc_7.tripod.com/d/
March 17, 2004
I cut and pasted the code into my  current
project and it works fine and prints:

date = Wed Mar 17 19:39:21 GMT+1000 2004

(WinXP)

Phill.

"J C Calvarese" <jcc7@cox.net> wrote in message news:c38htn$11j$1@digitaldaemon.com...
> Ant wrote:
> > If I do date from the command  prompt:
> > $ date
> > Tue Mar 16 10:19:51 EST 2004
> >
> > If I do it from D:
> > date = Sat Jan 17 03:39:50 GMT-0500 1970
> >
> > Is anybody using std.date at all?
> > (or std.zip?)
> >
> > Ant
> > ##########################
> > import std.date;
> >
> > void main()
> > {
> > printf("date = %.*s\n", std.date.toString(getUTCtime()));
> > }
>
> The "version (Win32)" section seems ok. Your example seems to work fine
> on my computer (WindowsXP).
>
> @echo off
> date /t
> time /t
> dmd std_date.d
> std_date.exe
> pause
>
> Tue 03/16/2004
> 09:43 PM
> d:\dmd\bin\..\..\dm\bin\link.exe std_date,,,user32+kernel32/noi;
> date = Tue Mar 16 21:43:30 GMT-0600 2004
>
> --
> Justin
> http://jcc_7.tripod.com/d/


March 17, 2004
Hang on thats one hour behind, hmmmnnnnnnn

It should have said

20:39:21

Its not reading the daylight savings time, no doubt.

Phill.


"Phill" <phill@pacific.net.au> wrote in message news:c396h6$13f5$1@digitaldaemon.com...
> I cut and pasted the code into my  current
> project and it works fine and prints:
>
> date = Wed Mar 17 19:39:21 GMT+1000 2004
>
> (WinXP)
>
> Phill.
>
> "J C Calvarese" <jcc7@cox.net> wrote in message news:c38htn$11j$1@digitaldaemon.com...
> > Ant wrote:
> > > If I do date from the command  prompt:
> > > $ date
> > > Tue Mar 16 10:19:51 EST 2004
> > >
> > > If I do it from D:
> > > date = Sat Jan 17 03:39:50 GMT-0500 1970
> > >
> > > Is anybody using std.date at all?
> > > (or std.zip?)
> > >
> > > Ant
> > > ##########################
> > > import std.date;
> > >
> > > void main()
> > > {
> > > printf("date = %.*s\n", std.date.toString(getUTCtime()));
> > > }
> >
> > The "version (Win32)" section seems ok. Your example seems to work fine
> > on my computer (WindowsXP).
> >
> > @echo off
> > date /t
> > time /t
> > dmd std_date.d
> > std_date.exe
> > pause
> >
> > Tue 03/16/2004
> > 09:43 PM
> > d:\dmd\bin\..\..\dm\bin\link.exe std_date,,,user32+kernel32/noi;
> > date = Tue Mar 16 21:43:30 GMT-0600 2004
> >
> > --
> > Justin
> > http://jcc_7.tripod.com/d/
>
>


March 18, 2004
"J C Calvarese" <jcc7@cox.net> wrote in message
news:c38htn$11j$1@digitaldaemon.com
| The "version (Win32)" section seems ok. Your example seems to work fine
| on my computer (WindowsXP).
|
| @echo off
| date /t
| time /t
| dmd std_date.d
| std_date.exe
| pause
|
| Tue 03/16/2004
| 09:43 PM
| d:\dmd\bin\..\..\dm\bin\link.exe std_date,,,user32+kernel32/noi;
| date = Tue Mar 16 21:43:30 GMT-0600 2004
|
| --
| Justin
| http://jcc_7.tripod.com/d/

It's a problem with DMD for Linux. I reported it months ago. But there're problems with Windows too, as Phill said. Try to run the same program but setting your timezone to South America Pacific (Bogotá, Quito, Lima: GMT-5, but not in the US): it'll fail.

-----------------------
Carlos Santander Bernal


March 18, 2004
Carlos Santander B. wrote:

> "J C Calvarese" <jcc7@cox.net> wrote in message
> news:c38htn$11j$1@digitaldaemon.com
> | The "version (Win32)" section seems ok. Your example seems to work fine
> | on my computer (WindowsXP).
> |
> | @echo off
> | date /t
> | time /t
> | dmd std_date.d
> | std_date.exe
> | pause
> |
> | Tue 03/16/2004
> | 09:43 PM
> | d:\dmd\bin\..\..\dm\bin\link.exe std_date,,,user32+kernel32/noi;
> | date = Tue Mar 16 21:43:30 GMT-0600 2004
> |
> | --
> | Justin
> | http://jcc_7.tripod.com/d/
> 
> It's a problem with DMD for Linux. I reported it months ago. But there're
> problems with Windows too, as Phill said. Try to run the same program but
> setting your timezone to South America Pacific (Bogotá, Quito, Lima: GMT-5,
> but not in the US): it'll fail.

You're right. It doesn't work then.

Wed 03/17/2004
09:14 PM
d:\dmd\bin\..\..\dm\bin\link.exe std_date,,,user32+kernel32/noi;
date = Thu Mar 18 02:14:21 GMT+0000 2004

> 
> -----------------------
> Carlos Santander Bernal


-- 
Justin
http://jcc_7.tripod.com/d/
March 18, 2004
"J C Calvarese" <jcc7@cox.net> wrote in message
news:c3b0q6$18mq$1@digitaldaemon.com
|
| You're right. It doesn't work then.
|
| Wed 03/17/2004
| 09:14 PM
| d:\dmd\bin\..\..\dm\bin\link.exe std_date,,,user32+kernel32/noi;
| date = Thu Mar 18 02:14:21 GMT+0000 2004
|
| --
| Justin
| http://jcc_7.tripod.com/d/

One more thing: IIRC, Y. Tomino found the source of the bug somewhere in the DMD code, or in Phobos, I can't remember that well. Anyway, Walter should know how to solve it. With Linux, however, I think it's a different story.

-----------------------
Carlos Santander Bernal


March 22, 2004
"Carlos Santander B." <carlos8294@msn.com> wrote in message news:c3b29o$1b4j$1@digitaldaemon.com...
> One more thing: IIRC, Y. Tomino found the source of the bug somewhere in
the
> DMD code, or in Phobos, I can't remember that well.

Hmm, I missed that. Do you remember the message?


« First   ‹ Prev
1 2