Showing results for Time - The Old New Thing

Mar 6, 2009
0
1

Why is the Win32 epoch January 1, 1601?

Raymond Chen
Raymond Chen

Public Service Announcement: This weekend marks the start of Daylight Saving Time in most parts of the United States. The structure records time in the form of 100-nanosecond intervals since January 1, 1601. Why was that date chosen? The Gregorian calendar operates on a 400-year cycle, and 1601 is the first year of the cycle that was active a...

OtherTime
Oct 31, 2008
0
0

Working with ambiguous and invalid points in time in managed code

Raymond Chen
Raymond Chen

Public Service Announcement: Daylight Saving Time ends in most parts of the United States this weekend. I pointed out some time ago that Win32 and .NET deal with daylight saving time differently. Specifically, Win32 always deals with the time zone you are currently in (even if it's not the time zone that corresponds to the timestamp you are mani...

CodeTime
Mar 7, 2008
0
0

Why can't I convert a time zone abbreviation into a time zone?

Raymond Chen
Raymond Chen

Suppose you have a string of the form . How can you parse this into something your program can manipulate, like say a or a ? Basically, you can't in the general case. The time zone abbreviation CST is ambiguous. It could mean U.S./Canada Central Standard Time, Australian Central Standard Time, China Standard Time, or Cuba Summer Time. There ma...

HistoryTime
Mar 9, 2007
0
0

Don't be so fast to discount those oddball time zones

Raymond Chen
Raymond Chen

This weekend marks the beginning of Daylight Saving Time in most parts of the United States, the first year under the new transition rules in the Energy Policy Act of 2005. Pay extra attention to your clocks this weekend. If you have a device that automatically adjusts for Daylight Saving Time, and it hasn't been updated for the new transition rul...

OtherTime
Oct 28, 2005
0
0

How to recognize different types of sentinel timestamps from quite a long way away

Raymond Chen
Raymond Chen

Some time ago, I discussed several timestamp formats you might run into. Today we'll take a logical step from that information and develop a list of special values you might encounter. Note that if you apply time zone adjustments, the actual timestamp may shift by up to a day. All of these special values have one thing in common: If you see them...

CodeTime
Aug 25, 2004
0
0

Why can’t you treat a FILETIME as an __int64?

Raymond Chen
Raymond Chen

The FILETIME structure represents a 64-bit value in two parts: typedef struct _FILETIME { DWORD dwLowDateTime; DWORD dwHighDateTime; } FILETIME, *PFILETIME; You may be tempted to take the entire FILETIME structure and access it directly as if it were an __int64. After all, its memory layout exactly matches that of a 64-bit (little-endian)...

CodeTime
Feb 26, 2004
0
1

Why do timestamps change when I copy files to a floppy?

Raymond Chen
Raymond Chen

Floppy disks use the FAT filesystem, as do DOS-based and Windows 95-based operating systems. On the other hand, Windows NT-based systems (Windows 2000, XP, 2003, ...) tend to use the NTFS filesystem. (Although you can format a drive as FAT on Windows NT-based systems, it is not the default option.) The NTFS and FAT filesystems store times...

HistoryTime