472,353 Members | 1,451 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

Oracle Time Conversion from EST to UTC and Back is 1 hour off?

1,584 Expert 1GB
I initially thought this had to do with Daylight savings time change, but now that it has passed in the US, I looked at the query and now I observed this behavior:

begin_time is my column and is assumed to be UTC+0.

This Yields 01:30
Expand|Select|Wrap|Line Numbers
  1. TO_CHAR(e.begin_time,'HH24:MI') BEGIN_UTC
Okay, let's convert that to US/Eastern:

This Yeilds 20:30 (Makes sense, 01:30-5:00=20:30)
Expand|Select|Wrap|Line Numbers
So let's take 20:30, and convert back to UTC just to test a clause that does this:

Expand|Select|Wrap|Line Numbers
  1. TO_CHAR(FROM_TZ(TO_TIMESTAMP('20:30','HH24:MI'),'US/Eastern') AT TIME ZONE 'UTC','HH24:MI') EST_2030
You'd think it would return 01:30, it doesn't. the result is 00:30 (one hour before)

Am I doing one of the conversions wrong?

Thanks for any help, I'm running low on Coffee today I guess.

Nov 7 '11 #1
1 13605
1,584 Expert 1GB

If I give it the day as well, (today's date), it yields 01:30 AM correctly.

Expand|Select|Wrap|Line Numbers
  1. TO_CHAR(FROM_TZ(TO_TIMESTAMP('2011-11-07 20:30','YYYY-MM-DD HH24:MI'),'US/Eastern') AT TIME ZONE '+00:00','HH24:MI')
Why doesn't Oracle assume Daylight Savings time (on/off) for today automatically when no day is given?

Weird. I guess I'll code in today's date automatically.
Nov 7 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

by: flupke | last post by:
Is there an easy to convert following hour notation hh:mm to decimals? For instance 2 hours and 30 minutes as 2:30 to 2,50 I don't really know...
by: heirou | last post by:
I'm a novice in this subject....I've made a database that requires a time conversion. For example, if local time is 1200, determine the time in...
by: Chandu | last post by:
Hi, I am working on awk programming which is similar to C programming and have got a doubt about time function returning a float value. Ex:...
by: bala | last post by:
Hi Access Gurus The MS Access DB (MS Access 2002 Database) which is currently serving as the backend Database to MS Access (MS Access 2002/XP)...
by: Paulers | last post by:
Hello, I'm working on an app that requires the functionality to convert the time in Austrailia to the time in New York (EST). I am wondering,...
by: moni | last post by:
This is all in C: I have 2 time values: System time and an input from the user. 1) System time is in the form of seconds from 1/1/1970...
by: moni | last post by:
I have 2 time values: System time and an input from the user. 1) System time is in the form of seconds from 1/1/1970 calculated by using
by: Evan Klitzke | last post by:
Although it is not present in ANSI C, the GNU version of stftime supports the conversion character %z, which is a time offset from GMT. The four...
by: DonLi2006 | last post by:
Hi, ddl & dml project varchar(10) start char(5) stop char(5) ------------------------- ----- ----- hey now 21:00 19:25...
by: arunbojan | last post by:
Hi friends..... Following is my code.... Dim FDT As DateTime = FDT.Now This will get the current date time..... How to find the time...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

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.