473,394 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

FileInfo and Coordinated Universal Time (UTC)

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.
Sep 26 '07 #1
5 2766
Smithers wrote:
[...]
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
Sep 26 '07 #2
Ahhh, very good. Thank you.
"Peter Duniho" <Np*********@NnOwSlPiAnMk.comwrote in message
news:13*************@corp.supernews.com...
Smithers wrote:
>[...]
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

Sep 26 '07 #3
"Smithers" <A@B.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
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

Sep 26 '07 #4
What are you talking about? The world is flat. "They" gave us different time
zones to make us *think* it's not flat.

-S
"Michael Starberg" <no@no.comwrote in message
news:Ou**************@TK2MSFTNGP02.phx.gbl...
"Smithers" <A@B.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
>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

Sep 26 '07 #5
"Smithers" <A@B.comwrote in message
news:Od**************@TK2MSFTNGP02.phx.gbl...
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

Sep 27 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Filip Lyncker | last post by:
Hi group , I need a function to convert a given local time to the correct Universal Time ( UTC/GMT). The problem is the Daylight Saving Times(DST). Unix/Linux uses the Olson TZ database wich...
8
by: marcus | last post by:
Is their a method in c++ or c that gives me the system time in milliseconds or higher resolution? I need it to be platform independent. Today I use timeGetTime which is windows specific. thanks
1
by: Drew | last post by:
Is there a way to check if it is daylight savings or not via c#? I have heard you can use System.Globalization? Thanks - Drew
9
by: Bob Achgill | last post by:
I would like to use the timestamp on files to manage the currency of support files for my VB windows application. In this case I would only put the timestamp of the file in the management database...
5
by: thomasamillergoogle | last post by:
I am building a .net client application that will be deployed world wide. The client can schedule reminders. To do this the user picks the datetime he wants the reminder sent, _I convert the...
74
by: Dominik Wallner | last post by:
Hi! I'm currently implementing a program which measures voltages through an external USB-AD-converter. It should output those values as time/voltage pairs. My problem is to measure the time...
5
by: Joris De Groote | last post by:
Hi Is it possible with an VB.Net application to get the GMT time and this time must be so that it doesn't use summer or winter time? Is this possible? How? Thanks Joris
12
by: Marcus | last post by:
Hello, I need a timezone to store timestamps in that is independent of daylight saving. From everything I've read, it seems I want either GMT or UTC. The only problem is I can't figure out from...
11
by: usenet | last post by:
Is the epoch time the number of seconds elapsed since January 1st 1970 in my timezone or as per UTC? I mean, if A's program makes a call to time() in Melboune and B's program makes a call to...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.