Thread overview
[phobos] date related failure in dmd test suite
Jan 20, 2011
Brad Roberts
Jan 20, 2011
Jonathan M Davis
Jan 20, 2011
Walter Bright
Jan 20, 2011
Brad Roberts
Jan 20, 2011
Walter Bright
Jan 20, 2011
Jonathan M Davis
January 20, 2011
With the recent datetime changes (not sure which one exactly), one of the dmd tests has started failing:

..\src\dmd.exe -m32 -Irunnable   -odtest_results\runnable -oftest_results\runnable\testzip_0.exe runnable\testzip.d -map nul.map

std.date and std.dateparse have been scheduled for deprecation. Please use std.datetime instead.

runnable\testzip.d(38): Error: function std.date.toDtime (DosFileTime time) is
not callable using argument types (DosFileTime)

runnable\testzip.d(38): Error: cannot implicitly convert expression (de.time) of
type DosFileTime to DosFileTime

runnable\testzip.d(103): Error: cannot implicitly convert expression
(toDosFileTime(getUTCtime())) of type DosFileTime to DosFileTime

January 20, 2011
On Thursday 20 January 2011 00:44:02 Brad Roberts wrote:
> With the recent datetime changes (not sure which one exactly), one of the dmd tests has started failing:
> 
> ..\src\dmd.exe -m32 -Irunnable   -odtest_results\runnable -oftest_results\runnable\testzip_0.exe runnable\testzip.d -map nul.map
> 
> std.date and std.dateparse have been scheduled for deprecation. Please use std.datetime instead.
> 
> runnable\testzip.d(38): Error: function std.date.toDtime (DosFileTime time)
> is not callable using argument types (DosFileTime)
> 
> runnable\testzip.d(38): Error: cannot implicitly convert expression
> (de.time) of type DosFileTime to DosFileTime
> 
> runnable\testzip.d(103): Error: cannot implicitly convert expression
> (toDosFileTime(getUTCtime())) of type DosFileTime to DosFileTime

It looks like Don took care of it. It hadn't even occurred to me to look at dmd's tests, since I haven't touched dmd, so I didn't catch it. As it is, I barely caught that that functionality needed to be in std.datetime, since IIRC std.zip is the only thing that uses it in Phobos, and it never would have occurred to me to care about DOS anything these days. Fortunately, it looks like it was any easy fix, since I did get that functionality into std.datetime.

- Jonathan M Davis
January 20, 2011

Jonathan M Davis wrote:
>
> It looks like Don took care of it. It hadn't even occurred to me to look at dmd's tests, since I haven't touched dmd, so I didn't catch it. As it is, I barely caught that that functionality needed to be in std.datetime, since IIRC std.zip is the only thing that uses it in Phobos, and it never would have occurred to me to care about DOS anything these days. Fortunately, it looks like it was any easy fix, since I did get that functionality into std.datetime.
>
> 

DOS file times can happen when you try to read a floppy disk. DOS file systems have persisted long after DOS itself died.
January 20, 2011
On Thu, 20 Jan 2011, Walter Bright wrote:

> Jonathan M Davis wrote:
> > 
> > It looks like Don took care of it. It hadn't even occurred to me to look at dmd's tests, since I haven't touched dmd, so I didn't catch it. As it is, I barely caught that that functionality needed to be in std.datetime, since IIRC std.zip is the only thing that uses it in Phobos, and it never would have occurred to me to care about DOS anything these days. Fortunately, it looks like it was any easy fix, since I did get that functionality into std.datetime.
> > 
> > 
> 
> DOS file times can happen when you try to read a floppy disk. DOS file systems have persisted long after DOS itself died.

Sounds like a misnaming then.. is it DOS or is it FAT?  Does NTFS use the same date formats?
January 20, 2011

Brad Roberts wrote:
> On Thu, 20 Jan 2011, Walter Bright wrote:
>
> 
>> Jonathan M Davis wrote:
>> 
>>> It looks like Don took care of it. It hadn't even occurred to me to look at dmd's tests, since I haven't touched dmd, so I didn't catch it. As it is, I barely caught that that functionality needed to be in std.datetime, since IIRC std.zip is the only thing that uses it in Phobos, and it never would have occurred to me to care about DOS anything these days. Fortunately, it looks like it was any easy fix, since I did get that functionality into std.datetime.
>>>
>>> 
>>> 
>> DOS file times can happen when you try to read a floppy disk. DOS file systems
>> have persisted long after DOS itself died.
>> 
>
> Sounds like a misnaming then.. is it DOS or is it FAT?  Does NTFS use the
> same date formats?
> 

The Microsoft documentation refers to it as a DOS file time.

NTFS uses different date formats.
January 20, 2011
On Thursday 20 January 2011 12:24:17 Walter Bright wrote:
> Brad Roberts wrote:
> > On Thu, 20 Jan 2011, Walter Bright wrote:
> >> Jonathan M Davis wrote:
> >>> It looks like Don took care of it. It hadn't even occurred to me to look at dmd's tests, since I haven't touched dmd, so I didn't catch it. As it is, I barely caught that that functionality needed to be in std.datetime, since IIRC std.zip is the only thing that uses it in Phobos, and it never would have occurred to me to care about DOS anything these days. Fortunately, it looks like it was any easy fix, since I did get that functionality into std.datetime.
> >> 
> >> DOS file times can happen when you try to read a floppy disk. DOS file systems have persisted long after DOS itself died.
> > 
> > Sounds like a misnaming then.. is it DOS or is it FAT?  Does NTFS use the same date formats?
> 
> The Microsoft documentation refers to it as a DOS file time.
> 
> NTFS uses different date formats.

I should _hope_ that NTFS doesn't use it. The range of dates that it covers is extremely limited. 32-bit time_t is bad enough...

- Jonathan M Davis