Converting TIme to a different zone time

Hi,
Right now, In my applicaiton a timestamp value is inserted to Database table. But as of now it inserts current system time (which ever zone application is run).
what can I do to make to change it to timestamp of US pacific zone.
As of now, the value below is inserted. This values needs to be changed to America los angeles time.
java.util.Date utilDate = new java.util.Date();
java.sql.Timestamp sqlDate = new java.sql.Timestamp(utilDate.getTime());
sqlDate is the value which I am inserting.
this sqlDate needs to be converted to pacific zone timestamp.
Thanks,
James

You can get a Calendar instance using a TimeZone as parameter. From there it's easy.
TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); is a good TimeZone candidate I guess.
Edited by: Mr.E.H. on Mar 5, 2008 8:16 AM

Similar Messages

  • My 5k has just posted 3 times w/ 3 different start times

    The same 5 k run posted earlier today at 10:29 AM & 3:29 PM. Now it's showing as being there 3 times and starting at 5:29 AM, 6:29AM, & 10:29 AM.
    Glad they installed the delete feature!

    I deleted the runs that shouldn't be there, but they kept coming back when I reconnected the Nano to try to post the Basic run that hadn't posted. So I did the reverse of my "fix" for runs missing from the Nike+ site. I moved the 5K run (that kept re-posting) from my "latest" folder on the Nano and put it in the "Synched" folder. Then reconnected the Nano to Itunes. Nike+ then posted the Basic run (with time stamp that was hours off but who's fussy) and did not re-post the 5K. (Despite the fact that Nike+ keeps saying through all of this that I am not connected to the Nike+ server.)
    This is all great fun in a kind of obsessive-compulsive way But I think I am going to give up this hobby of futzing with my Nike+ web-site and go pull weeds, wash the car, or do something really useful.

  • Cant upload website - times out on different % every time.

    Hello,
    I have had a lot of trouble this past week in uploading our company website, the only changes made have been to our pdf catalogue download. Every time i try to upload it eventually times out between 60-90% and i get a [421 error] message - there also seems to be no pattern on a specific file it gets stuck on and i have tried 20+ times! . We have other websites with the same hosting company and they upload fine so i assume i can rule out that the hosting is an issue.
    I began as usual by just selecting to upload modified files and even when i do this it seems to still upload the whole website, i have tried the option to upload the whole website but i get the same result. I have gone back and tried to upload old versions of the website and was surprised that these do not work either..?! I have tried even moving my folder that contains all my website uploads so that it would unlink from the website and trying to upload without all the files and this doesn't work either. I can upload to business catalyst and i can export to html.
    I unfortunately haven't been able to update Muse since last year as our operating system is outdated and the newer versions wont support it (i have asked for a newer computer at work but no luck!) although i doubt this is the problem as i am still able to upload our other websites!
    Does anyone have any suggestions? (in simple terms please!) 
    Thanks!
    http://www.lpegroup.com.au

    Hi Eliza,
    Can you try uploading the website using Passive mode from the options?
    Regards,
    Akshay

  • Convert Unix timestamp to Readable Date/time

    Hello.
    I'm reading a database with the time field expressed in Unix Time (number of seconds since 1/1/1970 00:00).
    Is there any fast way to convert it to "mm-dd-yyyy hh:mm:ss" ?
    Regards.

    Try something like this:
    DateFormat shortTime = DateFormat.getTimeInstance(DateFormat.LONG);
    String theTime = shortTime.format(new java.util.Date());
    DateFormat shortDate = DateFormat.getDateInstance(DateFormat.MEDIUM);
    String theDate = shortDate.format(new java.util.Date());
    System.out.println("The formatted date is: " + theDate + " and the formatted time is: " + theTime);Check out the static fields in the DateFormat class for the different formatting options.
    Hope that helps!
    - Sheepy

  • Mail message viewer-can I change time zone for "time received" & "time sent" to my local time?

    Does anyone know how to change the time zone MAIL uses to one's local time zone?  I'm talking about Apple's Mail Program that's "on my mac."  It shows all my "times sent" and "times received" in eastern time.  Not a big deal, but since I'm on the west coast, I'd prefer pacific time.  The menu bar at the very top of the screen shows local time, but Mail doesn't reflect that.  I have a desktop iMac, Lion 10.7.3.  Any help will be much appreciated!

    I had the same situation on my current business trip.  Home = SF (Pacific time), current location = Houston (Central time, 2 hours later).  For a message I just sent (and received a copy of) at 6:34 AM local (Houston) time, Mail (v6.6, in Mountain Lion 10.8.5) was displaying Date Received as 4:34 AM.  I can tell 'ya, it's *not* 4:34 AM where I'm sitting
    My practice on any trip to a different time zone is just what Carlo TD described -- use SysPrefs/DateTime to change the TZ to local geographic (and also change Calendar's TZ at upper right in its window, but that's not related to the Mail issue).  But when I did so, Mail didn't repaint its Date Received column.  On a hunch, I quit and re-started Mail.  Problem solved -- all the Date Received values changed to local (Houston) time!
    Now to send Apple a Feedback that Mail doesn't repaint its displayed times when SysPrefs/DateTime changes the TZ...
    [Interestingly, when I just posted this reply, the message in the thread shows something like "4:54 AM".  Perhaps Apple displays all Support threads in Cupertino (Pacific) time...]
    Message was edited by: jciccare

  • Converting Delivery Creation Date/Time into the Local Date/Time

    Hi
    I have two fields like 'Delivery Creation Date' and 'Delivery Creation Time' in ECC system . My user wants the Delivery Creation Date / Delivery Creation Time in Local time of Plants .
    For example :
    Delivery    Plant       DelivCreationDate       DelivCreationTime   DelivCreationDate(Local)   DelivCreationTime(Local)
    312456          1650               11/2/2007                     4:30                          11/2/2007                          3:30
    Here the Plant 1650 is in Mexico . The above delivery is created in Canada in ECC system according to the candain time .
    But user wants to convert the Candain Delivery Creation Date and Time into the Local Date/Time of specific plant .
    So we need to convert the  Candain Delivery Creation Date and Time into Mexico timings .
    How can it is possible this one and user wants to automate this process .
    Please let me know
    Mubeen

    DATA :
    timestamp like TZONREF-TSTAMPS,
    time like sy-uzeit,
    date like sy-datum.
    The following function module is used to convert the
    time and date into GMT timestamp
    CALL FUNCTION 'IB_CONVERT_INTO_TIMESTAMP'
    EXPORTING
    i_datlo = <source_fields>-delivery_date
    i_timlo = <source_fields>-delivery_time
    I_TZONE = CAD'
    IMPORTING
    E_TIMESTAMP = timestamp.
    The following function module is used to convert the
    above obtained timestamp to MEX  timezone date and time.
    CALL FUNCTION 'IB_CONVERT_FROM_TIMESTAMP'
    EXPORTING
    i_timestamp = timestamp
    I_TZONE = MEX
    IMPORTING
    E_DATLO = date
    E_TIMLO = time.
    CAD and MEX are variables i have used...
    the challenge is to find the canadian and mexican time zone....CAD and MEX.
    which you can get by performing a lookup in table T001W and passing country as parameter.

  • Error in report RSPOR_SETUP : "Different Server Times"

    Hi,
    I installed BI 7 and I have configured the communication between BI and EP.
    When I execute report RSPOR_SETUP to verify the configuration, I am getting the following error message at step 12 (Maintain User Assignment in Portal):
    2. Compare SAP BI and EP Server Time
    Different Server Times could be a reason for retrieving always an invalid SAP Logon Ticket.
       SAP BI Server Time:             09:08:16   2007/03/23
       SAP EP Server Time:            Fri Mar 23 09:08:16 EDT 2007
    The time is identical, but it seems that the format I causing me problem.
    How can I configure the date format in EP and BI ?
    Best regards,

    check the Note: 816761 and pasted it for you. May be this will help you.
    There are new options to define how certain date formats (date, timestamp and time properties) will be formatted.
    The following keys can be configured in:
    EP6:
    Configuration / Global Services / Property Metadata / Properties: Column "Additional Metadata"
    NW04/NW04S:
    Configuration / Global Services / Property Metadata / Properties: Select "Mode: Advanced". See column "Additional Metadata".
    -Format
    Use DateFormat defined patterns, DateFormat.SHORT, DateFormat.MEDIUM, DateFormat.LONG.
    Documentation: http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormat.html
    as values: long/medium/short.
    Example: format=long results in
    Date type -> 17 January 2005
    Timestamp -> 17 January 2005 16:09:23
    Time -> 16:09:23
    -customFormat
    To set a customer pattern according to documentation: http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
    If the pattern is not correct, the default date format will be used.
    Example: customFormat=dd.MM.yyyy hh:mm:ss -> 17.01.2005 04:09:23
    Regards.
    PS: assign points is the way to say thanks

  • Can i have two different face time accounts on one apple id

    Would like to have two different face time accounts, one on mac book pro and one on ipad.  Can I have two different face time accounts on one apple id?

    You simply need to have a separate e-mail identifier for each.  One e-mail address would be associated with the mac book, the other separate and distinctive e-mail address would be associated with the i pad.  This is done under one single apple id.  Essentialy, the e-mail addresses are the FaceTime calling numbers for each. 
    Wuz

  • I am trying to reorganise my apps on my iphone via the new itunes software, you don't seem to be able to move one app at a time to a different screen, just move the screens around, what am I doing wrong

    I am trying to reorganise my apps on my iphone via the new itunes software, you don't seem to be able to move one app at a time to a different screen, just move the screens around, what am I doing wrong

    Re: That garbage is unreadable.
    If you really want help, stop messing with the fonts and post so that others can read and offer suggestions.
    Or better yet... try a search, I'm certain you'll find a solution to whatever issue you're experiencing.
    I have found that many times it is the things that make you most angry that push you to action. This was the case here. Thank you for causing me to get so angry that I found the answer myself.

  • I downloaded a program and it never shiowed up in the download box. I can't find it anywhere on my computer. I tried it a few different times and from different sites but still nothing. What can I try next?

    I downloaded a program several times and from different download sites. It never showed up in the download box but it said all downloads have completed. I searched for it anywhere on my computer but the search produced no results.

    I suppose there is a possibility that you have security software than may be blocking quarantining or even deleting the downloaded file.
    Normally if Firefox says in the download manager that the file is downloaded then it is on your computer, and if you right click you should get the option to open the folder the er the downloaded file is in.
    #Use keyboard keys '''Ctrl + J''' to open Firefox's download manager
    #* or use ( press''' alt''' to display the menubar) Tools -> Downloads
    # in the downloads window find the file entry you are looking for and right click
    # use the option ''open containing folder''
    * see [[downloads window]] <-- clickable link --
    * and [[unable to download or save files]]
    Please post back with how you get on.

  • In  iTunes: why different run times for same track?

    I have occasional repeats of the same given track stored in iTunes. Sometimes, the 2 identical tracks show different running times. This happens when one track came from the Net (downloaded before I started using iTunes, then imported into iTunes) and the other comes from a commercial CD. Do you know why the differing times? FYI: In each case, I have checked the endings of both tracks; they are identical, so the music is the same even though one track is rated to run [much] longer than the other. Also, in "Get Info" there's a way to change the running time of a track, but this is no solution: if I enter a shorter run time, the track will truncate itself, and finish playing before the proper end of the song -- if I enter a longer time, I get dead air after the end of the recording. Any ideas?
      Windows XP  
      Windows XP Pro  
      Windows XP Pro  

    "will iphone users in Singapore have access to application from other countries? "
    No. You can buy from the itunes store in the country in which you reside.
    Each country has the same rules:
    "SINGAPORE ONLY. The Service is available to you only in Singapore and is not available in any other location. You agree not to use or attempt to use the Service from outside of the available territory. iTunes may use technologies to verify such compliance."
    http://www.apple.com/legal/itunes/appstore/sg/terms.html#APPS

  • Gantt chart- How to change the color of time bars of different versions

    Hi All,
    My Client wants to see all changes in planning schedule. I made different versions of these changes but he also want to see all these changes in gantt chart and in different colors. I tried to change the color in planning board assistant but in this screen (CJ27/ CJ2B). we cannot view all versions together. And if I use CN41, there I cannot change the colors of time bars.
    Secondly, we can change colors of times bars of basic dates, forecast dates and actual dates but there is no provision to change the colors of schedule bars of different project versions. Kindly reply-
    1. How to see all project versions in CJ27 or How to customise bar chart in cn41 or if we change in SPRO, then how to change graphic profile in project info profile
    2. How to change colors of different time bars of different versions.
    3. How to mention these legends (meaning of each color in chart) at footer of gantt chart (in print outs)
    Please Help.
    Thanks & Regards
    Dinesh Chauhan

    Thanks,
    actually I've created new project planning board profile where planning board assistant is customized but unable to use this profile in CN41. we can change PS info profile in CN41 and that;s why I thought that planning board profile may be assigned somewhere in PS info profile so that changes in planning board assistant will be applied in CN41 through PS info profile. Graphic profile is too complex to understand and not sure if it will help to get colored time bars of projct versions in gantt chart. Still not clear.
    Secondly not able to see all versions (snap shots) in gantt chart with different colors of time bars.
    I mean planning board screen can be customized but we cannt see different versions here which are possible in CN41, but we cannt customize the gantt chart (time bars) in CN41. Pls help.
    Thx & Regards
    Dinesh Chauhan

  • How do i run two threads with different sleep times?

    How do i run two threads with different sleep times?
    Ive got thread A and thread B, they both update a jpanel.
    They both start when i press the start button.
    However thread A updates every 250ms and thread B updates every 1000ms. i cant just run them both at 250ms becuase this will mess it up.
    So for every four runs of thread A i want thread b to only be run once
    Does anyone know how to do this?
    Thanks, Ant...

    ok, ive done it but now i cant stop it!
    ive added buttons to start and stop, the start button works but the stop button doesnt. why doesnt "t.stop();" work?
        public void run() {
            while(t == Thread.currentThread()) {
                System.out.println("No " + t.getName());
                if (t.getName().equals("1")){
                    try {
                        t.sleep(1000); // in milliseconds
                    } catch (InterruptedException e) {}
                } else{
                    try {
                        t.sleep(250); // in milliseconds
                    } catch (InterruptedException e) {}
        }

  • 2 different lease time on same scope

    Hi, is it possible to add 2 different lease time on same scope.
    I have server and workstation on the same scope and I want to give the servers longer lease time, than the workstation. 

    Hi
    It is possible to achieve this in the Windows 2012 and higher versions of DHCP Servers using the feature of DHCP policies. You can create a policy within a scope. In that policy you can specify the type of clients you want this policy enabled for. The type
    of clients can be differentiated based on
    MAC Address
    Vendor Class
    User Class
    Client Identifier
    Relay Agent Information (and its sub options – remote id, circuit id and subscriber id)
    in DHCP Server 2012
    and based on FQDN along with above in DHCP Server 2012 R2.
    Once the policy has been created you can set the lease time for the policy as per your needs. For more details you can look at the blog post entry below.
    http://blogs.technet.com/b/teamdhcp/archive/2012/08/22/granular-dhcp-server-administration-using-dhcp-policies-in-windows-server-2012.aspx
    Thanks

  • Imported swfs display different every time

    Hello -
    I have tried importing swfs, and each time it displays different when published. The first time, it resized and could be seen completely within the window. The second time, it did not resize so only the top left of the image could be seen. The third, time it sort of resized, but is still cut off on the bottom. I inserted the same swf file the same way each time, so I'm not sure what affects the way it displays when published. I'm using the trial version of Presenter version 7.0.7 Build 7746. The swfs were created in Captivate 5.0, and I'm using Office/PowerPoint 2010. Below are examples of what each looks like after the publish. Does anyone know how I can control how the swf will display once published?
    Thanks!
    Katherine

    Hello -
    I think it has to do with resizing the swf once it is imported. I resized it first by widening it so it went the entire width of the page - the second time I believe I did the same thing and got the larger image. Then I tried various ways of resizing and also not moving or resizing at all, and got these different results. It is not consistent, the same way of resizing did not result in the same output. Is it not possible to resize the imported swf - for example, resize so it takes up the entire slide? Below is a link to download the swf I'm using.
    http://mylearn.documentum.com/curriculumdevelopment/slide4.zip
    Thanks!
    Katherine

Maybe you are looking for

  • Can I insert comments into RTF Templates?

    I'm using Oracle XML Publisher Template Builder for Word, Version 5.6 Build 45. The RTF template I'm working on has grown to be quite complex, and I would like to include some documentation on the template, so that other people who might pick up the

  • I wish to know whether a program in VB can be downloaded into labview to make it into a VI

    I am interested in controlling a stepper motor using labview. I have the program developed in VB and the code is working perfectly. I wish to know whether it is possible to convert the VB file into a VI file with all the control palettes and loops. I

  • Configuring Oracle E-Biz 11.5.10 and R12 adaptors on same OOB warehouse.

    We have Oracle BI Applications 7.9.6.1 implemented for Oracle E-Business Suite 11.5.10 Applications and running in Production, there is a plan to configure the same for Oracle E-Business Suite R12 in coming days. We appreciate any help on below queri

  • Standby prevents ending call

    Hair trigger standby makes it difficult to end call. When I try to end a phone call, my iPhone goes into standby so quickly that I cannot end the call. I have to bring it out of standby to end the call and often it goes back into standby so quickly t

  • How would i do a tabbed user interface ?

    Hi everyone, how would I do a tabbed user interface ? example | tab 1 | tab 2 | tab 3 | tab 4 | description of tab 1 when the person clicks on tab 1 they would see the appropriate pane for tab 1 , if they click tab 2 the would see the appropriate pan