473,800 Members | 2,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Windows XP timezone language issue

I ran into an internationaliz ation issue. I need a consistent idea about
the timezone my application is running on. However when I run the following:
>>import time
time.tzname
I get back ('West-Europa (standaardtijd) ', 'West-Europa (zomertijd)')
which is in dutch (the language of the host machine) and verbose.
I wanted to get ('CEST','CET') or something international so I can work
with itin the same way on all platforms.

That is the right way to find out the timezone in a consistent way
across platforms (windows/linux/mac) and languages?

Paul
Jun 13 '07 #1
2 2006
On Jun 13, 7:31 am, Paul Sijben <paul.sij...@xs 4all.nlwrote:
I ran into an internationaliz ation issue. I need a consistent idea about
the timezone my application is running on. However when I run the following:
>>import time
>>time.tzname

I get back ('West-Europa (standaardtijd) ', 'West-Europa (zomertijd)')
which is in dutch (the language of the host machine) and verbose.
I wanted to get ('CEST','CET') or something international so I can work
with itin the same way on all platforms.

That is the right way to find out the timezone in a consistent way
across platforms (windows/linux/mac) and languages?
Well, time.timezone will return the timezone as an integer.

Jun 13 '07 #2
MRAB wrote:
On Jun 13, 7:31 am, Paul Sijben <paul.sij...@xs 4all.nlwrote:
>I ran into an internationaliz ation issue. I need a consistent idea about
the timezone my application is running on. However when I run the following:
> >>import time
time.tzname

I get back ('West-Europa (standaardtijd) ', 'West-Europa (zomertijd)')
which is in dutch (the language of the host machine) and verbose.
I wanted to get ('CEST','CET') or something international so I can work
with itin the same way on all platforms.

That is the right way to find out the timezone in a consistent way
across platforms (windows/linux/mac) and languages?
Well, time.timezone will return the timezone as an integer.
true, I am wondering if that is enough for my app. (with some of the odd
timezones in the world and DTS issues and all....

Jun 14 '07 #3

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

Similar topics

7
3206
by: Jim Davis | last post by:
I'm (still) working on an ISO 8601 date parser. I want to convert at least the formats described here: http://www.w3.org/TR/NOTE-datetime Well.. I've got most of it working (via RegEx's) good enough for me but I'm having a brain block when it comes to TimeZone. The datetime may come with an optional timezone offset (from GMT) as here (the offset is +1 hour from GMT):
13
2874
by: Bruno Wolff III | last post by:
Recently there has been some discussion about attaching a timezone to a timestamp and some other discussion about including a 'day' part in the interval type. These two features impact each other, since if you add a 'day' to a timestamp the result can depend on what timezone the timestamp is supposed to be in. It probably makes more sense to use a timezone associated with the timestamp than say the timezone GUC or the fixed timezone UTC. ...
0
1793
by: jrhastings | last post by:
I know there are many threads on this topic but I haven't yet found an answer to this question. I'd like to map from a utc to a local time in an arbitrary timezone (not necessary the default local timezone). To do this on UNIX is relatively straightforward by setting the TZ environment variable (and calling time.tzset()). On Windows, one can get close to the answer using the pytz module (to load the timezone based on the standard UNIX...
7
4962
by: Larry W. Virden | last post by:
I have a need to printf the time, date and daylight savings time indicator for a series of countries (and states when there is more than one timezone in the country), given a specific date and time. Does anyone have a pointer to an example of how to make proper use of the time zone databases to find the right time, given a location? I suspect that I will have to hand code the mapping of the locations to timezones, and then just convert...
2
2647
by: mac11 | last post by:
I have a question about getting the current time. Here is a small program that just gets the time and displays it: #include <stdio.h> #include <time.h> #include <sys/time.h> #include <unistd.h> int main() { char buf;
18
12119
by: newbie | last post by:
Hi, I wonder if it's possible to detect a user (the browser's) timezone when he/she access my php file? I saw ppl suggesting using javascript to collect that information. But I wonder if it's possible to do it without the headache of javascript. Thanks,
2
3690
by: =?Utf-8?B?Sm9ubnk=?= | last post by:
I have an ASP.NET 2.0 C# web application that is contacting an Exchange server using WEBDAV. It allows the users to look up appointments for a future date. The problem I have is determining the correct client time zone. Note that Exchange stores everything in UTC time. I am able currently able to use javascript to ask the client what time zone they are in, but this is only for the "today" (the current day) and not for a day in the...
0
1688
by: AqD | last post by:
Hi all! I just noticed on windows (2003; php 5.2.5) the LOCAL timezone is set to UTC by default. I have never experienced this on linux before... I digged the manual and found this: """ The timezone set using the date_default_timezone_set() function (if any)
2
3325
by: SvenV | last post by:
Hello, I'm looking for a way to set the timezone on a mobile (windows CE4.0). I know there is no specific function in .NET1.1 and by looking on pinvoke.net: HomePage (misc) between coredll I understand that there is no API function to do the trick. The scenario is the following: I have a server which sends out his dateTime information using the following format "yyyyMMdd zzz" . This returns the date + timezone. This reaches the mobile as a...
1
10253
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10035
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9090
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7580
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6813
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5471
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2945
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.