Get Current Time in Eastern Time Zone

Hi,
I would like to fetch the current time but in ET timezone (and also i want to handle
daylight thing automatically).
So can anyone tell me on this .
Requirement is to fetch value in ET timezone even your db resides in India or Canada or Germany.
Regards,
Sandeep

You can use current_timestamp at time zone tz_offset('EST'):
SQL> set linesize 132
SQL> column ct format a45
SQL> column ctz format a45
SQL> ALTER SESSION SET TIME_ZONE = 'Europe/Berlin';
Session altered.
SQL> select current_timestamp ct, current_timestamp at time zone tz_offset('EST') ctz from dual;
CT                                            CTZ
11-JUL-08 10.20.53.002549 PM EUROPE/BERLIN    11-JUL-08 03.20.53.002549 PM -05:00
SQL> ALTER SESSION SET TIME_ZONE = 'Canada/Mountain';
Session altered.
SQL> select current_timestamp ct, current_timestamp at time zone tz_offset('EST') ctz from dual;
CT                                            CTZ
11-JUL-08 02.21.02.344091 PM CANADA/MOUNTAIN  11-JUL-08 03.21.02.344091 PM -05:00
SQL> SY.

Similar Messages

  • Is the reservation system launching at 10:00 local time or eastern time?

    Is the reservation system launching at 10:00 local time or eastern time?
    I heard that it would be realeased then. I don't want to be sitting around by my computer for the next hour. Even though I probably will anyways...

    According to this article: http://9to5mac.com/2012/09/24/apple-retail-scheduled-to-launch-personal-pickup-f or-iphone-5-tonight/, it's 10:00 Eastern.  If true, it should be live now.

  • HT4623 my new iPad mini retina will not set the time to Eastern time.

    It is set to Pacific time.  Tried turning it off for 20 minutes and back on.  No good.  Any ideas?

    Try this  - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.) No data/files will be erased.
     Cheers, Tom

  • How can i get current time of a given timezone

    how can i get current time of a given timezone
    for example: Asia/Hong_Kong
    my code is like this, but the result is not correct.
    what's wrong?
    import java.util.*;
    public class test {
    public static void main(String[] args){
              String s = "Asia/Hong_Kong";
              String tempS = "";
              TimeZone myTime = new SimpleTimeZone(s);
              //TimeZone myTime = TimeZone.getTimeZone(s);
              Calendar myCal = new GregorianCalendar(myTime);
              tempS = myCal.get(Calendar.YEAR)+"-"+
                        (myCal.get(Calendar.MONTH)+"-"+
                        myCal.get(Calendar.DATE)+" "+
                        (myCal.get(Calendar.HOUR)+":"+
                        myCal.get(Calendar.MINUTE)+":"+
                        myCal.get(Calendar.SECOND);
              System.out.println(tempS);
    output is : 2001-7-15 11:16:48
    but the correct time should be: 2001-8-16 7:17:48
    the correct time should be 2001-8-16

    Certain indexes in the Calendar API start at 0 rather then 1, so, when you get the value, you may want to increment.
    I'm not sure why the time is incorrect. You may want to call getAvailableIDs() and make sure that the desired TimeZone ID is supported by your version. I doubt that Sun would have incorrect support for the time zone, but it may not be included, or perhaps it is included with a diffrent ID. You can always create your own time zone as well, by passing the String offset to getTimeZone(), the offset being how many hours beyond or before GMT. Hopefully this helps.

  • How can i get current time in different TimeZone

    Hi alls,
    How can i get current time in different TimeZone.
    I've tried
    final Calendar calendar = Calendar.getInstance(GMT0_TIME_ZONE);
    final Date date = calendar.getTime();
    but it returns current time in my time zone not in GMT0

    a simple way would be:Sometimes gets you the right result (not during daylight saving), but always the wrong way.
    I would strongly recommend getting into the habit of handling Dates correctly. A Date is a universal instant in time - the number of milliseconds since midnight GMT on 1 January 1970. That instant corresponds to various dates and times, depending on your time zone and the effect of daylight saving. You make that conversion of a universal instant to a localized date/time using Calendar and DateFormat.

  • Problem with getting current date and time using oracle.jbo.domain.Date

    I`d like to get current date and time using oracle.jbo.domain.Date method getCurrentDate(), but it always return current date and 12:00:00. I also need to get the current time.

    I think you should use java.sql.Timestamp domain.
    (And set database type to TIME or DATETIME.)
    Jan

  • I need to get the Current System Date and time in the format

    I need to get the Current System Date and time in the format
    *6/24/2009 11:30:29 AM*
    How do i do it ?

    I seem to be saying this a lot lately.
    Google is your friend.
    I googled "java current date format" and SimpleDateFormat featured prominently in the results.

  • Get  current date and time

    hello.
    How can I get current date and time in JAVA?
    Thanks.

    Sorry, I mean:
    how can I get the value of DATE, MONTH, and YEAR of the
    current date?
         Date date = new Date();
         System.out.println(date);

  • How to get current time and date??

    How to get current time and date from my PC time and date to the java application??
    i use java.util.* package but got error, that is:
    - java.util.* and java.sql.* class are match
    - abstract class cannot be instantiated
    so what can i do, pls guide...thanks...

    There is a method in the System class that will return the current system time. You could also instantiate a Date, Time, Timestamp, or Calendar object, all of which get created with the system time by default.
    Don't import *. Import the specific classes you need.
    Next time, post the actual text of the exceptions/compile errors. If you make people guess, most just won't bother.

  • How can we get current time date with resultset?

    Dear All,
    I have to insert current time date in the table.So,i need to get the current time and date with result set.So,I will first get the time date and then insert it into the table.
    I know how can we get current time and date without resultset.i have created this function its working.But now i want to use this.mean using resultset i want to put in the table.
    How can i do this?
    public static String DATE_FORMAT_NOW = "yyyy-MM-dd HH:mm:ss";
    public static String now() {
    Calendar cal = Calendar.getInstance();
    SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);
    return sdf.format(cal.getTime());
    }

    yuck. Why not simply set a "new java.sql.Date()" to the SQL parameter in question?

  • Get actual time for specific time zone

    Dear experts,
    is it possible to get the actual time for a given time zone? We need to know the time of a certain plant and we are searching for a standard function module which calculates the time based on the plants time zone.
    Thanks in advance,
    David
    Edited by: David Claes on Apr 12, 2010 5:05 PM

    You can use TIME ZONE statement for this.
    DATA: time_stamp_s TYPE string,
                time_stamp     TYPE timestamp,
                tzone              TYPE timezone,
               wf_date_conv TYPE sy-datum,
               wf_time_conv TYPE sy-uzeit.
    tzone = 'CET'.
    CONCATENATE sy-datlo   "Local Date
                              sy-timlo    "Local Time
                      INTO time_stamp_s.
    time_stamp = time_stamp_s.
    CONVERT TIME STAMP time_stamp TIME ZONE tzone INTO DATE wf_date_conv TIME wf_time_conv.
    Otherwise FM IB_CONVERT_INTO_TIMESTAMP/IB_CONVERT_FROM_TIMESTAMP can bne used for same.
    Edited by: Satyajit on Apr 13, 2010 1:31 PM

  • HT5313 I can't get 10.7.5 to download.  Have gone through "Software Update" several times and each time error messg suggests perhaps the file has been corrupted when downloading.  Current OS=10.7.4   Thoughts?

    I can't get 10.7.5 to download.  Have gone through "Software Update" several times and each time error messg suggests perhaps the file has been corrupted when downloading.  Current OS=10.7.4   Thoughts?

    Try downloading from here. http://support.apple.com/kb/DL1583
    Message was edited by: hpr3

  • I have installed firefox 4 times. Each time, when it gets to run it asks me if I am current user or Administrator. I click current user, then no wizard appears. help!

    I have installed firefox 4 times. Each time, when it gets to run it asks me if I am current user or Administrator. I click current user, then no wizard appears. If I check Administrator, there is no password that works.

    I am still having this problem, but only on my lenovo w520. Is it something on the computer I have to uncheck? Or whatever? Help!

  • When I send emails w/Firefox (AOL) they are time stamped i hour earlier than my PC's system clock. My system is set to Eastern Time Zone

    When I send emails w/Firefox (AOL) they are time stamped i hour earlier than my PC's system clock. My system is set to Eastern Time Zone

    The cache is mentioned several times in the report.
    Go to ~/Library/Caches/com.apple.systempreferences
    Move the Cache.db file from the com.apple.systempreferences folder to the Trash.
    Restar your Mac.
    ~ (Tilde) character represents the Home folder.
    For Lion:   To find the Home folder in OS X Lion, open the Finder, hold the Option key, and choose Go > Library

  • Netflix: netflix is currently unavailable at this time. please try again later.

    Hi,
    I've had an Apple TV2 for about a month now and today I'm having an issue with Netflix. When I try to pull up Man Men I get the following error: netflix is currently unavailable at this time. please try again later
    However every other thing I've tried playing on Netflix works. I click a movie/tv show and there's a small delay but with Mad Men that message immediately appears like it's cached.
    I tried restoing my Apple TV2, I've streamed the show on my computer and iPhone with no issues it's only on my Apple TV that I cannot watch this show.

    Same problem with Mad Men here.  Watched two episodes last night.  My wife and daughter watched four episodes this afternoon.  Then Netflix not available tonight for only this show starting around 7:00 pm.  Unplugged everything from Apple TV, reset DNS on Apple TV, and then even restored Apple TV to no avail.  All other shows are fine on Apple TV except Mad Men and Mad Men episodes stream fine to MacBook and IPad.  Can't figure this out.

Maybe you are looking for

  • How to get values from a ref cursor in a procedure

    I have a procedure that returns a cursor type of values, but I cannot get the values. I got error when on how to define the output cursor. Could someone please look at the code and tell me how to correct it? Thanks in advance. ***********************

  • Deleting rows from a table

    COuld anyone tell me how to delete rows from a table which has millions of rows. TIA, Oracle user

  • My volume button became sound effects, no sound at all

    Can anyone help me with my ipad2, my button volume became Sound Effects label, and my iPad has no sound at all.

  • Append data to a nested table within structure

    I am trying to write some code (not really an ABAPer but helping out) and my code is not quite working. i have a structure that is made up of up three tables and a structure.  it is part of an DIMP add on. I have typed my tables and structures and ta

  • ABAP-HR OUTBOUND INTERFACE

    HELLO EXPERTS,                                   Plz provide me with any sample code for outbound interfaces in abap-hr as i'm new to this concept. Thanks, Naveen Sharma