Results 1 to 2 of 2

Thread: Need help in converting system time by using timeZoneOffset

  1. #1
    Sencha User
    Join Date
    Jan 2013
    Posts
    5
    Vote Rating
    0
      0  

    Default Need help in converting system time by using timeZoneOffset

    I want to display time and date depend on user, for that i need to convert local time to profile based time by timeZoneOffset, which i will get from server.

    here the code i am using to get local time.

    Code:
    var now = new Date();
                        var currentDate = new Date();    
                        currentDate.toUTCString();
                        var time = currentDate.getTime();
                        var sysdate = Ext.Date.format(currentDate,'M d, Y h:i A T');
                        var today = sysdate;
                        var timezone = today;
    how do i apply timeZoneOffset from server to convert time.

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379
    Answers
    3997
    Vote Rating
    1524
      0  

    Default

    So you want to add (or subtract) hours to the date? You can use Ext.Date.add for this.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •