473,397 Members | 1,961 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,397 software developers and data experts.

C# Time zone

Avi
I have a problem to get the different time zone's name for example

I need the name of time zone UTC + 4:30 ("Kabul")

The TimeZone.CurrentTimeZone get my current time zone name
and I couldn't see how to get a different time zone name

please hlp this is very important.

Avi
Nov 16 '05 #1
2 24601
You can read all of the time zones in the registry, under
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\

Under this key, there is a separate subkey for each time zone. Under the
subkey, the value "Std" contains the standard name (such as "Eastern
Standard Time") of the time zone, "Dlt" contains the daylight name (such as
"Eastern Daylight Time",) and the value "Display" contains the name
displayed in TimeDate.cpl (such as "(GMT-05:00) Eastern Time (US & Canada)")

What you could do is match System.TimeZone.CurrentTimeZone.StandardName to a
"Std" value under one of these subkeys; for which the "Display" value would
contain the display name, such as the example you gave for Kabul.

Robert

"Avi" <Av*@discussions.microsoft.com> wrote in message
news:1B**********************************@microsof t.com...
I have a problem to get the different time zone's name for example

I need the name of time zone UTC + 4:30 ("Kabul")

The TimeZone.CurrentTimeZone get my current time zone name
and I couldn't see how to get a different time zone name

please hlp this is very important.

Avi

Nov 16 '05 #2
..NET v1.0 & v1.1 currently support operations on local system timezone. If
you need more timezones , you could get it from the registry . I also highly
recommend to have a look at this link . :
http://www.michaelbrumm.com/simpletimezone.html

Kapil
"Avi" <Av*@discussions.microsoft.com> wrote in message
news:1B**********************************@microsof t.com...
I have a problem to get the different time zone's name for example

I need the name of time zone UTC + 4:30 ("Kabul")

The TimeZone.CurrentTimeZone get my current time zone name
and I couldn't see how to get a different time zone name

please hlp this is very important.

Avi

Nov 16 '05 #3

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

Similar topics

2
by: MLH | last post by:
I would like to be able to look up any 5-digit ZIP in a table that would show the correct time zone for the area. For example, I would like to look up 91915 in the table and see something that...
3
by: Jon Davis | last post by:
The date string: "Thu, 17 Jul 2003 12:35:18 PST" The problem: // this fails on PST DateTime myDate = DateTime.Parse("Thu, 17 Jul 2003 12:35:18 PST"); Help? Jon
10
by: Marc Pelletier | last post by:
Hello, I am writing an application that does some simple astronomical calculations. One of the variables I need is the number of hours passed in this year. I've written the following function ...
1
by: Clodoaldo Pinto Neto | last post by:
Hi all, I want to have the time zone string (like 'BRT') displayed after a date-time. The date column is of the type timestamp with time zone. But the time zone is not displayed. It works for...
14
by: Cesar Ronchese | last post by:
Hello! I've built a program that show some dates to users. I got a problem when users have different configured time zone machines, where: - One machine that determined time zone the date...
2
by: Mike | last post by:
I'm writing an application for Windows XP Embedded. This application requires that the user be able to change the time zone from within the application. I'm trying to do this using...
3
by: Satish Itty | last post by:
Hi all, I have a big problem in my hands and not sure how I can fix this. Any suggestions would be greatly appreciated. I have a .NET 3 tier app developed in VS2003 and .NET 1.1. the client is a...
7
by: Steve | last post by:
Hi All I have a windows application written in VB.net 2005 The users have to select a State of Australia, which I use to check they have the correct windows time zone selected in control panel...
7
by: Correia | last post by:
I have a webserver that is in another country and have a different time zone. How can i fix this and use the scripts with the correct time zone? Thanks
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
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,...

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.