Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / September 2007

Tip: Looking for answers? Try searching our database.

FileInfo and Coordinated Universal Time (UTC)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Smithers - 26 Sep 2007 05:21 GMT
The System.IO.FileInfo class provides us with a few properties that involve
time:
CreationTime
CreationTimeUtc
LastAccessTime
LastAccessTimeUtc
LastWriteTime
LastWriteTimeUtc

What is the difference between the Utc and "non Utc" versions of these
properties?

Just wondering which I should be going with.

I'm writing a utility that backs up files (copies them from production
servers to backup server). Part of the routine is to compare the last
date/time a file has been modified. So the LastWriteTime is apparently the
one to go with - but which version? Utc or non utc?

Thanks.
Peter Duniho - 26 Sep 2007 06:02 GMT
> [...]
> I'm writing a utility that backs up files (copies them from production
> servers to backup server). Part of the routine is to compare the last
> date/time a file has been modified. So the LastWriteTime is apparently the
> one to go with - but which version? Utc or non utc?

I would use the UTC version.  UTC is Coordinated Universal Time,
basically the same as Greenwich Mean Time for most purposes.

If you know that the local times will always be returned using the same
timezone, you could probably get away with using that.  But UTC will
always be comparable to each other, no matter what happens to the local
time (daylight saving, time zone change).

Pete
Smithers - 26 Sep 2007 06:14 GMT
Ahhh, very good. Thank you.

>> [...]
>> I'm writing a utility that backs up files (copies them from production
[quoted text clipped - 11 lines]
>
> Pete
Michael Starberg - 26 Sep 2007 21:11 GMT
> Ahhh, very good. Thank you.

I think humankind should invent a really huge antigravity field,
hand out showels, go to work, and make the world flat.

And then we can all live in one realtime. No need for UTC =)

Just A Suggestion
- Michael Starberg
Smithers - 26 Sep 2007 23:09 GMT
What are you talking about? The world is flat. "They" gave us different time
zones to make us *think* it's not flat.

-S

>> Ahhh, very good. Thank you.
>
[quoted text clipped - 5 lines]
> Just A Suggestion
> - Michael Starberg
Michael Starberg - 27 Sep 2007 22:34 GMT
> What are you talking about? The world is flat. "They" gave us different
> time zones to make us *think* it's not flat.
>
> -S

Aah. My Bad!
I kneel corrected.

- Michael Starberg

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.