www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - If you're on an Windows XP or Vista box and live in the U.S...

reply Jonathan M Davis <jmdavisProg gmx.com> writes:
If you're on an Windows XP box and live in the continental U.S., I'd very much 
appreciate if you could run this program and post the output:

import std.datetime;
import std.stdio;

void main()
{
    writeln(SysTime(Date(1999, 3, 1)));
    writeln(SysTime(Date(1999, 3, 8)));
    writeln(SysTime(Date(1999, 3, 14)));
    writeln(SysTime(DateTime(1999, 3, 14, 1, 0, 0)));
    writeln(SysTime(DateTime(1999, 3, 14, 2, 0, 0)));
    writeln(SysTime(DateTime(1999, 3, 14, 3, 0, 0)));
    writeln(SysTime(Date(1999, 3, 15)));
    writeln(SysTime(Date(1999, 3, 22)));
    writeln(SysTime(Date(1999, 3, 29)));
    writeln(SysTime(Date(1999, 4, 1)));
    writeln(SysTime(Date(1999, 4, 3)));
    writeln(SysTime(DateTime(1999, 4, 4, 1, 0, 0)));
    writeln(SysTime(DateTime(1999, 4, 4, 2, 0, 0)));
    writeln(SysTime(DateTime(1999, 4, 4, 3, 0, 0)));
    writeln(SysTime(Date(1999, 4, 5)));
}

I only have Windows 7 to play around with, and I'd like to know what happens 
on XP and Vista. My guess is that Vista acts the same as 7, but I'm not at all 
certain that XP does. This code uncovers a bug in std.datetime on Windows 7, 
and the best way to solve it could depend on the behavior of Windows XP and 
Vista. So, if you have the appropriate OS and live in the continental US (or 
use the _exact_ same time zone as one of the 3 primary U.S. time zones), I'd 
appreciate it if you could run this program and post the output. Thanks.

The related bug report is here: 
http://d.puremagic.com/issues/show_bug.cgi?id=5781

- Jonathan M Davis
Mar 23 2011
next sibling parent Bekenn <leaveme alone.com> writes:
California, Windows XP via Virtual PC:

1999-Mar-01 00:00:00
1999-Mar-08 00:00:00
1999-Mar-14 00:00:00
1999-Mar-14 01:00:00
1999-Mar-14 01:00:00
1999-Mar-14 02:00:00
1999-Mar-14 23:00:00
1999-Mar-21 23:00:00
1999-Mar-28 23:00:00
1999-Mar-31 23:00:00
1999-Apr-02 23:00:00
1999-Apr-04 00:00:00
1999-Apr-04 01:00:00
1999-Apr-04 03:00:00
1999-Apr-05 00:00:00

For comparison, here's Windows 7:

1999-Mar-01 00:00:00
1999-Mar-08 00:00:00
1999-Mar-14 00:00:00
1999-Mar-14 01:00:00
1999-Mar-14 01:00:00
1999-Mar-14 02:00:00
1999-Mar-14 23:00:00
1999-Mar-21 23:00:00
1999-Mar-28 23:00:00
1999-Mar-31 23:00:00
1999-Apr-02 23:00:00
1999-Apr-04 00:00:00
1999-Apr-04 01:00:00
1999-Apr-04 03:00:00
1999-Apr-05 00:00:00
Mar 24 2011
prev sibling next sibling parent Walter Bright <newshound2 digitalmars.com> writes:
On 3/23/2011 11:27 PM, Jonathan M Davis wrote:
 If you're on an Windows XP box and live in the continental U.S., I'd very much
 appreciate if you could run this program and post the output:

XP: 1999-Mar-01 00:00:00 1999-Mar-08 00:00:00 1999-Mar-14 00:00:00 1999-Mar-14 01:00:00 1999-Mar-14 01:00:00 1999-Mar-14 02:00:00 1999-Mar-14 23:00:00 1999-Mar-21 23:00:00 1999-Mar-28 23:00:00 1999-Mar-31 23:00:00 1999-Apr-02 23:00:00 1999-Apr-04 00:00:00 1999-Apr-04 01:00:00 1999-Apr-04 03:00:00 1999-Apr-05 00:00:00
Mar 24 2011
prev sibling next sibling parent reply "Nick Sabalausky" <a a.a> writes:
I have no idea which 3 of the 4 continental US time zones you consider the 
"primary" ones, but I'm in Cleveland, which is the Eastern time zone (and 
the same as New York). I have no idea if it's currently daylight savings 
time or not - I can never remember which is which (But I do know we recently 
pushed the clocks ahead an hour, so whatever that means).

XP Pro SP2 32-bit:

1999-Mar-01 00:00:00
1999-Mar-08 00:00:00
1999-Mar-14 00:00:00
1999-Mar-14 01:00:00
1999-Mar-14 01:00:00
1999-Mar-14 03:00:00
1999-Mar-15 00:00:00
1999-Mar-22 00:00:00
1999-Mar-29 00:00:00
1999-Apr-01 00:00:00
1999-Apr-03 00:00:00
1999-Apr-04 01:00:00
1999-Apr-04 02:00:00
1999-Apr-04 03:00:00
1999-Apr-05 00:00:00
Mar 24 2011
parent reply "Nick Sabalausky" <a a.a> writes:
"Steven Schveighoffer" <schveiguy yahoo.com> wrote in message 
news:op.vsvckfcpeav7ka steve-laptop...
 On Thu, 24 Mar 2011 18:02:05 -0400, Jonathan M Davis <jmdavisProg gmx.com> 
 wrote:

 Given that the other posts list XP with having 23:00 on the day before 
 rather
 than at 00:00 for the dates in the middle, it looks like XP has the same
 behavior as XP. However, it looks like whatever time zone you have your
 computer in (if it's really the same as New York, it would Eastern 
 Daylight
 Time at the moment) is not actually EST/EDT proper (either that or the 
 two
 other posts with XP are on SP3 while you're on SP2 and changes were made 
 in
 SP3 which affect the Windows functions being called). Glancing at the 
 list of
 Windows time zones though, I don't see any cities which would currently 
 would
 be in normal Eastern time but would have been in a slightly different 
 time
 zone (e.g. no DST) prior to 2007. I _thought_ that some of Indiana was 
 that
 way, but if so, they didn't get a special time zone for it in Windows.

IIRC, there was a large problem when the time zone changes were enacted for XP. I remember originally Microsoft was NOT going to update XP unless you wanted to pay them some ridiculous amount (something like $10k) for a patch. However, there were numerous tools that could be used to edit the time zone information. So they eventually did update XP (must be they got raided by the common sense police). I would highly suspect that Nick's system isn't updated since it's at SP2 (I'm pretty sure the original SP2 was pre- the timezone changes) and Microsoft typically stops releasing patches for an older service pack when a new one comes out. Nick, you really should update to SP3, there literally is no down side, except the time it takes to update, and then apply the subsequent patches that have been released since SP3.

Hypothetically speaking, if a person was on an unauthorized version of XP SP2, then they would be blocked from installing SP3 (since the SP3 update requires validation that it's a legitimate copy of XP). Since MS no longer offers legitimate copies of XP and the Windows licenses are non-transferable, such an immoral person would, as far as I'm aware, be stuck with SP2. Hypothetically speaking, of course.
Mar 24 2011
next sibling parent reply dsimcha <dsimcha yahoo.com> writes:
On 3/24/2011 6:59 PM, Nick Sabalausky wrote:
 Windows licenses are non-transferable

Apparently Microsoft has never heard of the First-Sale Doctrine. (http://en.wikipedia.org/wiki/First_Sale_Doctrine) WTF????
Mar 24 2011
parent "Nick Sabalausky" <a a.a> writes:
"dsimcha" <dsimcha yahoo.com> wrote in message 
news:imgjhb$1ort$1 digitalmars.com...
 On 3/24/2011 6:59 PM, Nick Sabalausky wrote:
 Windows licenses are non-transferable

Apparently Microsoft has never heard of the First-Sale Doctrine. (http://en.wikipedia.org/wiki/First_Sale_Doctrine) WTF????

That's typical among american corporations, unfortunately. And it's not even limited to the First-Sale Doctrine. American corporations didn't like limited copyright so they had that outright changed (thanks in part to the help of Sunny Bozo). They don't like the Fair Use doctine either, so they piss on that, too. Basically anything that gets in the way of ecenomic anarchy they just shit all over.
Mar 24 2011
prev sibling next sibling parent Kagamin <spam here.lot> writes:
Steven Schveighoffer Wrote:

 OEM copies are not transferrable, but those will only work on the vendor's  
 BIOS key anyways.  So they are "technically" transferrable to another  
 system with the same vendor, but I don't think the license officially  
 permits it.

I think, OEM copy can be transferred with computer on which it's installed.
Mar 24 2011
prev sibling parent reply Bekenn <leaveme alone.com> writes:
On 3/24/2011 3:59 PM, Nick Sabalausky wrote:
 Since MS no longer offers legitimate copies of XP

Windows 7 Professional (and above) comes with a full license for XP in a virtual machine. That's how I got my results above. Reference: http://www.microsoft.com/windows/virtual-pc/default.aspx
Mar 24 2011
parent "Nick Sabalausky" <a a.a> writes:
"Bekenn" <leaveme alone.com> wrote in message 
news:imhbne$30et$1 digitalmars.com...
 On 3/24/2011 3:59 PM, Nick Sabalausky wrote:
 Since MS no longer offers legitimate copies of XP

Windows 7 Professional (and above) comes with a full license for XP in a virtual machine. That's how I got my results above. Reference: http://www.microsoft.com/windows/virtual-pc/default.aspx

Hypothetical Johnny doesn't want his primary OS to be in a VM.
Mar 24 2011
prev sibling next sibling parent Jonathan M Davis <jmdavisProg gmx.com> writes:
 I have no idea which 3 of the 4 continental US time zones you consider the
 "primary" ones, but I'm in Cleveland, which is the Eastern time zone (and
 the same as New York). I have no idea if it's currently daylight savings
 time or not - I can never remember which is which (But I do know we
 recently pushed the clocks ahead an hour, so whatever that means).
 
 XP Pro SP2 32-bit:
 
 1999-Mar-01 00:00:00
 1999-Mar-08 00:00:00
 1999-Mar-14 00:00:00
 1999-Mar-14 01:00:00
 1999-Mar-14 01:00:00
 1999-Mar-14 03:00:00
 1999-Mar-15 00:00:00
 1999-Mar-22 00:00:00
 1999-Mar-29 00:00:00
 1999-Apr-01 00:00:00
 1999-Apr-03 00:00:00
 1999-Apr-04 01:00:00
 1999-Apr-04 02:00:00
 1999-Apr-04 03:00:00
 1999-Apr-05 00:00:00

LOL. There _are_ 4 main time zones, aren't there. A 3 hour difference means 4 different time zones, not 3. Ouch. I obviously didn't think that one through enough. Regardless, I need the code to be run in a time zone which was affected by the 2007 DST rule changes that were made in the U.S. I _know_ that the Pacific, Mountain, Central, and Eastern time zones were affected by the DST rule changes in 2007. There are obviously some areas in the continental U.S. which weren't (such as Arizona), but the those four main ones were. The time zones for Alaska and Hawaii were probably affected as well, but I don't know for sure. Also, I _think_ that Canada also changed their DST rules, but I'm not sure. I know that Mexico didn't. Regardless, I need the code run in a time zone which was affected by the DST rule changes that the U.S. made in 2007. Given that the other posts list XP with having 23:00 on the day before rather than at 00:00 for the dates in the middle, it looks like XP has the same behavior as XP. However, it looks like whatever time zone you have your computer in (if it's really the same as New York, it would Eastern Daylight Time at the moment) is not actually EST/EDT proper (either that or the two other posts with XP are on SP3 while you're on SP2 and changes were made in SP3 which affect the Windows functions being called). Glancing at the list of Windows time zones though, I don't see any cities which would currently would be in normal Eastern time but would have been in a slightly different time zone (e.g. no DST) prior to 2007. I _thought_ that some of Indiana was that way, but if so, they didn't get a special time zone for it in Windows. If Windows were really using the TIME_ZONE_INFORMATION struct that it's given, then I would expect the behavior that you're showing. If it's trying to determine the real DST rules and ignore the struct it's given, then I would expect the behavior that I'm seeing on my Windows 7 box and what Walter and Bekenn posted. So, my guess is that SP3 changed how the time zone stuff was handled. - Jonathan M Davis
Mar 24 2011
prev sibling next sibling parent "Steven Schveighoffer" <schveiguy yahoo.com> writes:
On Thu, 24 Mar 2011 18:02:05 -0400, Jonathan M Davis <jmdavisProg gmx.com>  
wrote:

 Given that the other posts list XP with having 23:00 on the day before  
 rather
 than at 00:00 for the dates in the middle, it looks like XP has the same
 behavior as XP. However, it looks like whatever time zone you have your
 computer in (if it's really the same as New York, it would Eastern  
 Daylight
 Time at the moment) is not actually EST/EDT proper (either that or the  
 two
 other posts with XP are on SP3 while you're on SP2 and changes were made  
 in
 SP3 which affect the Windows functions being called). Glancing at the  
 list of
 Windows time zones though, I don't see any cities which would currently  
 would
 be in normal Eastern time but would have been in a slightly different  
 time
 zone (e.g. no DST) prior to 2007. I _thought_ that some of Indiana was  
 that
 way, but if so, they didn't get a special time zone for it in Windows.

IIRC, there was a large problem when the time zone changes were enacted for XP. I remember originally Microsoft was NOT going to update XP unless you wanted to pay them some ridiculous amount (something like $10k) for a patch. However, there were numerous tools that could be used to edit the time zone information. So they eventually did update XP (must be they got raided by the common sense police). I would highly suspect that Nick's system isn't updated since it's at SP2 (I'm pretty sure the original SP2 was pre- the timezone changes) and Microsoft typically stops releasing patches for an older service pack when a new one comes out. Nick, you really should update to SP3, there literally is no down side, except the time it takes to update, and then apply the subsequent patches that have been released since SP3. -Steve
Mar 24 2011
prev sibling next sibling parent Jonathan M Davis <jmdavisProg gmx.com> writes:
 Given that the other posts list XP with having 23:00 on the day before
 rather than at 00:00 for the dates in the middle, it looks like XP has the
 same behavior as XP.

Ouch. Wasn't that profound. I meant that "it looks like XP has the same behaviour as _Windows 7." - Jonathan M Davis
Mar 24 2011
prev sibling next sibling parent "Steven Schveighoffer" <schveiguy yahoo.com> writes:
On Thu, 24 Mar 2011 18:59:16 -0400, Nick Sabalausky <a a.a> wrote:

 "Steven Schveighoffer" <schveiguy yahoo.com> wrote in message
 news:op.vsvckfcpeav7ka steve-laptop...
 On Thu, 24 Mar 2011 18:02:05 -0400, Jonathan M Davis  
 <jmdavisProg gmx.com>
 wrote:

 Given that the other posts list XP with having 23:00 on the day before
 rather
 than at 00:00 for the dates in the middle, it looks like XP has the  
 same
 behavior as XP. However, it looks like whatever time zone you have your
 computer in (if it's really the same as New York, it would Eastern
 Daylight
 Time at the moment) is not actually EST/EDT proper (either that or the
 two
 other posts with XP are on SP3 while you're on SP2 and changes were  
 made
 in
 SP3 which affect the Windows functions being called). Glancing at the
 list of
 Windows time zones though, I don't see any cities which would currently
 would
 be in normal Eastern time but would have been in a slightly different
 time
 zone (e.g. no DST) prior to 2007. I _thought_ that some of Indiana was
 that
 way, but if so, they didn't get a special time zone for it in Windows.

IIRC, there was a large problem when the time zone changes were enacted for XP. I remember originally Microsoft was NOT going to update XP unless you wanted to pay them some ridiculous amount (something like $10k) for a patch. However, there were numerous tools that could be used to edit the time zone information. So they eventually did update XP (must be they got raided by the common sense police). I would highly suspect that Nick's system isn't updated since it's at SP2 (I'm pretty sure the original SP2 was pre- the timezone changes) and Microsoft typically stops releasing patches for an older service pack when a new one comes out. Nick, you really should update to SP3, there literally is no down side, except the time it takes to update, and then apply the subsequent patches that have been released since SP3.

Hypothetically speaking, if a person was on an unauthorized version of XP SP2, then they would be blocked from installing SP3 (since the SP3 update requires validation that it's a legitimate copy of XP). Since MS no longer offers legitimate copies of XP and the Windows licenses are non-transferable, such an immoral person would, as far as I'm aware, be stuck with SP2. Hypothetically speaking, of course.

What do you mean "non-transferrable"? Full genuine copies of XP are transferrable, as long as you deactivate the original copy. Also, XP Pro upgrades are installable over Windows 2000. I have a windows 2000 disc and an XP pro upgrade disc that I used to enable XP-mode on my Windows 7 home edition system (not the pro version of windows 7). The copy has SP3 installed without issue. OEM copies are not transferrable, but those will only work on the vendor's BIOS key anyways. So they are "technically" transferrable to another system with the same vendor, but I don't think the license officially permits it. It also might fail the genuine test. I suspect if you used the key from the original computer when validating the genuine-ness of the system (assuming that computer is no longer active), it should work. The answer is, you don't know until you try. However, I would highly recommend making an image backup of your system if you do ;) -Steve
Mar 24 2011
prev sibling parent "Steven Schveighoffer" <schveiguy yahoo.com> writes:
On Fri, 25 Mar 2011 02:02:43 -0400, Kagamin <spam here.lot> wrote:

 Steven Schveighoffer Wrote:

 OEM copies are not transferrable, but those will only work on the  
 vendor's
 BIOS key anyways.  So they are "technically" transferrable to another
 system with the same vendor, but I don't think the license officially
 permits it.

I think, OEM copy can be transferred with computer on which it's installed.

I think Nick means "transferrable to a different machine". Of course the OS can stay installed on the computer its installed on. OEM versions of XP use SLP licensing, which means the BIOS contains a special key in a certain location in memory, and the OEM version of XP will only activate if that key is present (in fact, the SLP key *is* the activation, there is no internet-based activation). Case in point, if you get a Dell with an XP pro disk, you can install the disk on any system, even ones that are licensed for XP home, and it does not require activation. -Steve
Mar 25 2011