UTCNow <> GMT

  • Thread starter Thread starter Nick
  • Start date Start date
Thanks for the followup Nick,

I'm glad that you've got a working way.

Sincerely,

Steven Cheng
Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

--------------------
From: "Nick" <[email protected]>
Subject: Re: UTCNow <> GMT
Date: Mon, 21 Jul 2008 10:45:55 +0100
 
The UK is in the GMT timezone. For part of the year the UK observes Daylight
Saving.

The GMT timezone is UTC+0 (with a bias of +60 minutes for Daylight Saving).

When the UK enters Daylight Saving, it's timezone is NOT renamed. Instead,
an alias of BST is used.

Here is New Zealand the timezone is NZST or New Zealand Standard Time
(UTC+12) and the alias for daylight saving is NZDT or New Zealand Daylight
Time (UTC+12 + another 60 minutes).

So you see, timezones are NOT renamed, we simply use an alternative
monicker.

Also you need to reverse you thinking, because GMT is based on UTC and NOT
the other way round.

Therefore:

GMT = UTC+0
BST = UTC+0 + another 60 minutes

By extrapolation GMT can never be UTC+1 or UTC+2.

Well, it is possible, but it would involve the UK land mass up and moving 15
degrees or more to the east. Somehow I don't think that's going to happen
until the Earth get's hit by a very big object from outer space and, if that
happened then what timezone we were in would be the least of our worries.
 
Hi,

Stephany said:
2. Store your timestamps as Universal Time Coordinated (UTC). This requires
only one conversion when the value is finally displayed. For all other
purposes all values will automatically be 'in sync'.

To obtain a value in UTC, simply use the DateTime.UtcNow method.

To display a UTC value in local time, simply use the myvalue.ToLocalTime
method.

that is the exact approach that I originally intended to implement.

However, the discussions in this thread really got me confused/thinking as
to whether DateTime.UtcNow.ToLocalTime() will always consider the correct
value for Daylight Savings. :-)

Of course I can't do anything if users haven't set their timezone right,
but actually I don't really need to care. The important thing really is to
assure that, when synchronizing their data over my WebService, users
read/write the right data, according to the timestamps in their records.
Even if UTCNow wouldn't return the right value on some systems, that would
be sort of a permanent issue and thus not be a problem.

Cheers,
Olaf
 
Also you need to reverse you thinking, because GMT is based on UTC and NOT
the other way round.

How can GMT possibly be based around UTC? GMT was decided long before UTC
was created surely??
 
Nick said:
How can GMT possibly be based around UTC? GMT was decided long
before UTC was created surely??

UTC is not the historic base. UTC is the base for calculations. That's what
Stephany probably ment (did you?).


Armin
 
Time (sic) for a short (and abridged) history of GMT.

At sometime in the distant past, one of the King's of England decreed that
an observatory would be built on some land he granted for the purpose at
Greenwich.

At some point in the 18th century, the need to be able to calculate
longitude correctly became an issue for maritime navigators. As part of the
solution for the longitude 'problem' a line of reference was required.
Purely for the sake of convenience, the scientists decided to draw an
imaginary line from the North Pole to the South Pole taht ran throught the
Greenwich Observatory building. This line is called the Prime Meridian and
the time anywhere along that line was considered to be Greenwich Mean Time
or GMT, which was recognised as the basis for calculating local times.

Fast forward a couple of hundred years.

In the the 1950's and 1960's scientists found that the standard methodology
for calculating time based on GMT was not accurate enough for modern
purposes, (air travel, space travel, telecommunications, etc.). Around this
time the atomic clock was also developed. After much gnashing of teeth and
tearing of hair, an International Convention determined that GMT would no
longer be used as the basis for calculating local times. Instead they
introduced an International Standard named Universal Time Coordinated or
UTC.

The base for UTC is the Prime meridian, (just like GMT was), so it appears
to the great unwashed that UTC and GMT are one and the same thing.

This widespread misunderstanding is the crux of the whole issue.

UTC is the basis for time calculations and GMT is a timezone.

Then to top it all off, human nature comes into the equation. If you rename
something then an waful lot of people are going to continue to call it what
they always called it and no amount if education is going to change that.

Unfortunately, in this case, UTC is not GMT with a new name. UTC replaced
GMT as the International Standard, but GMT still continues as a time zone.

The GMT timezone is defined as UTC+0. When daylight saving is in place in
the UK it is UTC+0 plus another 60 minutes and the alias BST is used instead
of GMT.

So you see, GMT is based on UTC and not the other way round.
 
Stephany,

I assume that you have the same theory about English; That it is a
coincidence that the language started in England, but that it is based on
the International Dictionary for English.

You describe exactly that UTC inherits GMT.

Cor
 
Hello Stephany,
The GMT timezone is defined as UTC+0.

I don't care which way around the definition works as long as we agree that
they are *always* equivilent
When daylight saving is in place
in the UK it is UTC+0 plus another 60 minutes and the alias BST is
used instead of GMT.

In this statement 'it' seems to be a reference to GMT. If true, this implies
that during this period the value of GMT shifts by 1 hour.

I admit that I may be misinterpretting your words, but if I can then others
might.

I believe/hope that your intention was to suggest that "Local time" rather
than "GMT" shifts by an hour and that this new time is known as BST.

GMT cannot shift as there are countries along this geographical Time-Zone
which do not observe any form of Summer Time adjustment.

Again my appologies for continuing this thread. My reasoning is that I am
a native English speaker (Perhaps not the best ;)) resident in England, Uk
and I must admit that parts of this thread definitely have had me confused
as to the nature of this system (UTC, GMT, BST, Others) at times. I can only
imagine the trouble that someone who is not a native English speaking person
*might* have.

I hope that the thread as a whole helps someone :)
 
Your local time is GMT, even during daylight saving. During daylight saving
it (GMT) is offset by 60 minutes and, for the purposes of the daylight
saving period, in called by the alias BST.

All countries, and in some cases, parts of countries, that are in the same
time zone share the same offset from UTC and the same daylight saving rules
(start date/time, end date/time and bias).

The only countries in the GMT time zone are:
The United Kingdom of Great Britain and Northern Ireland
The Republic of Ireland
Portugal
 
Rory said:
Hello Göran,

I think we are outside the OP original point by now however.....


I meant for you to supply a reference as to how GMT+1 could in some
cases be UTC+1 and in other cases be UTC+2. I do not see how this can be
the case. The uk switches from GMT to BST and back again, but GMT itself
and UTC remain static and (near enough) identical to one another. Is
this not so?

GMT+1 can never be the same as UTC+2.

Now that I reread what you wrote, I am not sure I interpreted what you
said correctly. I'm fairly sure we agree. Sorry to anyone who might have
become confused by what I have said :)

Sorry if I'm unclear, it's important to distinguish between time zones
and time offsets when we get into the specifics...

A time zone that uses GMT+1 would, when daylight savings time is active,
be two hours ahead of the UTC time. That's what I meant. :)
 
Hello Stephany,
Your local time is GMT, even during daylight saving. During daylight
saving it (GMT) is offset by 60 minutes and, for the purposes of the
daylight saving period, in called by the alias BST.

My system is set to GMT and set to adjust for daylight savings.
In my immediate window.....
-------------------------------------------------------------
? Now<enter>
#7/23/2008 2:56:12 PM#
? Now.ToUniversalTime<enter>
#7/23/2008 1:56:27 PM#
-------------------------------------------------------------
This would seem to prove.....
...."Now" returns a value which is presadjusted for BST because that's the
current local time.
...."Now.ToUniversalTime" returns UTC/GMT.


The msdn help for "DateTime.Now" says....
 
Olaf said:
Hi,



that is the exact approach that I originally intended to implement.

However, the discussions in this thread really got me confused/thinking as
to whether DateTime.UtcNow.ToLocalTime() will always consider the correct
value for Daylight Savings. :-)

Of course I can't do anything if users haven't set their timezone right,
but actually I don't really need to care. The important thing really is to
assure that, when synchronizing their data over my WebService, users
read/write the right data, according to the timestamps in their records.
Even if UTCNow wouldn't return the right value on some systems, that would
be sort of a permanent issue and thus not be a problem.

Cheers,
Olaf

If you use DateTime.GetUtc, you get a linear time that is independent of
time zones and daylight savings time, so whatever settings the user has,
you get the correct time. (Unless the clock is actually set to an
incorrect time, but most computers get the time from an internet server
nowadays so that should rarely be the case.)

When you use the ToLocalTime method to convert the time to display it,
it will be correct according to the settings of the computer. If the
settings are wrong, and later corrected, the time will display
correctly. As you store the time as UTC, all previously stored times
will also then display correctly.
 
By George, I think she's got it.


Rory Becker said:
Hello Stephany,


My system is set to GMT and set to adjust for daylight savings.
In my immediate window.....
-------------------------------------------------------------
? Now<enter>
#7/23/2008 2:56:12 PM#
? Now.ToUniversalTime<enter>
#7/23/2008 1:56:27 PM#
-------------------------------------------------------------
This would seem to prove.....
..."Now" returns a value which is presadjusted for BST because that's the
current local time.
..."Now.ToUniversalTime" returns UTC/GMT.


The msdn help for "DateTime.Now" says....
 
Back
Top