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

Offset from GMT

I have an asp.net application that presents some user account information
from Active Directory. I want to present current dates and times to the
users in cases where the raw date/time is in GMT. Since the GMT offset
changes depending on the time of year, the program would need to change
twice a year. If I can determine the current offset from GMT from the
system, then I wouldn't have to change the program. I know that the system
knows the offset since it records the dates in GMT. Is it an easy value to
obtain from the system? My .Net skills are quite rudimentary. Thanks for
any help or references.
Apr 19 '06 #1
1 3153
You can use the DataTime.ToUniversalTime() method to set any local DateTime
to GMT. Similarly, you can find the offset of local time to GMT by
subtracting the local time from the local time as GMT, using the same
method.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

"Rich Raffenetti" <ra********@comcast.net> wrote in message
news:O6**************@TK2MSFTNGP04.phx.gbl...
I have an asp.net application that presents some user account information
from Active Directory. I want to present current dates and times to the
users in cases where the raw date/time is in GMT. Since the GMT offset
changes depending on the time of year, the program would need to change
twice a year. If I can determine the current offset from GMT from the
system, then I wouldn't have to change the program. I know that the system
knows the offset since it records the dates in GMT. Is it an easy value to
obtain from the system? My .Net skills are quite rudimentary. Thanks for
any help or references.

Apr 19 '06 #2

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

Similar topics

0
by: Christopher Li | last post by:
I am surprised to find out the mmap module in python always mmap from offset 0. So I just hack up some patch to allow it accept offset arguments. So here it is. Chris Add optional offset...
24
by: Christopher Benson-Manica | last post by:
Is there anything wrong with my attempt (below) at implementing something resembling a smart pointer? template < class T > class SmartPointer { private: T *t; public:
4
by: Gactimus | last post by:
Here is a program that encodes and decodes a text file. What I need to do is write a C++ program that requests 3 different file names. One filename is for the source file to be encoded, another is...
0
by: D. Dante Lorenso | last post by:
I need to know that original number of rows that WOULD have been returned by a SELECT statement if the LIMIT / OFFSET where not present in the statement. Is there a way to get this data from PG ?...
24
by: funkyj | last post by:
PROBLEM STATEMENT: I want to calculate the byte offset of a field with a struct at compile time without instantiating an instance of the struct at runtime AND I want to do this in an ANSI standard...
1
by: Manish | last post by:
The code is as ... $folderlistfile = $path."xmlfile.xml"; /* <list> <details id="2"> <name>Books</name>
1
verbatim
by: verbatim | last post by:
I’m having a problem with FF2.0 trying to find the y offset of an object. I've tried several different scripts; all seem to be similar to this one. I keep getting strange values for the Y offset....
8
by: printline | last post by:
Hello I have a problem which i hope someone can help me with. I have a website where customers can login and their current and previous orders. What i need now is for the customers to look...
2
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...
8
by: Thomas Mlynarczyk | last post by:
Hello, I want to split a given string into tokens which are defined by regexes: // example tokens - a bit more complex in real $tokens = array( 'NUMBER' ='~^\d+~', 'NAME' ='~^+~', 'ANY' ...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.