Time in the world

  • Thread starter Thread starter Rene
  • Start date Start date
R

Rene

I am currently displaying the time of day value using the "h:mm:ss tt"
format (hr=hours, mm=minutes, ss=seconds tt=AM/PM).

I was looking under the "Regional and Language Options" and it looks like
the day time representation on all of the countries in the world always
start with Hours, then Minutes and Finally Seconds.

It appeared that the only difference is that different countries represent
the AM and PM differently but I am assuming the "h:mm:ss tt" format will
take care of that automatically.

So my question is, is it safe to use the "h:mm:ss tt" format and be sure
that the time will be displayed currently no matter what country the program
is being used on?

Thanks.
 
I screwed up my question, here it goes again:

So my question is, is it safe to use the "h:mm:ss tt" format and be sure
that the time will be displayed *correctly* no matter what country the
program is being used on?
 
Rene said:
I screwed up my question, here it goes again:

So my question is, is it safe to use the "h:mm:ss tt" format and be sure
that the time will be displayed *correctly* no matter what country the
program is being used on?

That really depends on what you mean by "correctly". It will always
show it with the hours in the 1-12 range, and will always use the AM/PM
designator. It will always show the correct time, but it may not be in
the format which is most common in that part of the world.

Perhaps you're looking for the "T" format specifier, which gives the
"long" time format which is most suitable for the current culture? (In
the UK, that's HH:mm:ss, I believe that in the US, that's hh:mm:ss tt.)
 
Hey Jon:
Perhaps you're looking for the "T" format specifier, which gives the
"long" time format which is most suitable for the current culture? (In
the UK, that's HH:mm:ss, I believe that in the US, that's hh:mm:ss tt.)

Using the "T" format may solve my problems but I don't really want to use
the "long" time.

If you look at the "Regional and Language Options" under the "Time" field
you will notice the *format* of the time being displayed on the sample time
is exactly what I am looking for. If you choose different countries from the
combo box the Time text shows the representation of the date for the
selected country, having said that, can I assume the following?

1) The text appearing on the sample will be the exact same one that I would
get when using my format?
2) It looks like some countries don't have AM/PM but they only use 24 hours
time, will my format also account for that automatically since it appears
that AM/PM does not exist?

Thanks
 
Rene said:
Using the "T" format may solve my problems but I don't really want to use
the "long" time.

If you look at the "Regional and Language Options" under the "Time" field
you will notice the *format* of the time being displayed on the sample time
is exactly what I am looking for.

That's what the "long" time format is, I believe. Why don't you want to
use it?
If you choose different countries from the
combo box the Time text shows the representation of the date for the
selected country, having said that, can I assume the following?

1) The text appearing on the sample will be the exact same one that I would
get when using my format?

No - as I said before, it will *always* use the AM/PM designator, and
*always* use a 12 hour clock.
2) It looks like some countries don't have AM/PM but they only use 24 hours
time, will my format also account for that automatically since it appears
that AM/PM does not exist?

They *do* have AM/PM designators, but those aren't used in the normal
time format.

I really do think that the long format ("T") is what you're after. I
suggest you try it for several cultures and see if there are any
cultures where it doesn't do what you want.
 
I am such an idiot, I just realized that I can select any country and hit
the apply button and Windows will reflect the setting. I though that I had
to purchase the OS from the specific country to test this!



Thanks
 
Back
Top