Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7787447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:40:26+00:00 2026-06-01T20:40:26+00:00

consider am having the string date and time. say var selfwDepDate = document.forms[0].fwDepartureDate.value; var

  • 0

consider am having the string date and time.
say

var selfwDepDate    = document.forms[0].fwDepartureDate.value;
var selfwDepTime    = document.forms[0].fwDepartureTime.value;

and having time zone as

var orgTimeZone = document.getElementById('orginTimeZone').value;
var descTimeZone = document.getElementById('descTimeZone').value;

can any one how to convert the String date to GMT date..
value of orgTimeZone = Asia/Dubai
value of descTimeZone = America/New_York

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T20:40:28+00:00Added an answer on June 1, 2026 at 8:40 pm

    I think you can use timezone-js.

    Create a timezoneJS.Date the same way as a normal JavaScript Date,
    but append a timezone parameter on the end:

    var dt = new timezoneJS.Date('10/31/2008',
      'America/New_York');
    var dt = new timezoneJS.Date(2008, 9, 31, 11, 45,
      'America/Los_Angeles');
    

    OR

    you can approach like this:-

    var now = new Date();
    
    var utc = new Date(Date.UTC(
        now.getFullYear(),
        now.getMonth(),
        now.getDate(),
        now.getHours(),
        now.getMinutes()
    ));
    

    Now for different timezone you need to add or subtract the time by which they differ from GMT.
    Note :-Date.UTC() returns the number of milliseconds since the epoch, UTC.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

consider the following two pieces of code: public static Time Parse(string value) { string
I am having a lil hard time with map and the valuetype allocation. consider
Consider the following string: $MRK - Merck - ($AAPL, $MSFT, $F) having day $AA!
Consider having a list - Ferrari, Mclaren, Red Bull on A2, A5, A8 cells,
Please consider this site . I'm having trouble stretching the submenu list items in
Consider the following Scala case class: case class WideLoad(a: String, b: Int, c: Float,
I'm having a hard time wrapping my head around non-static nested classes in Java.
Consider the following string: I have had the greatest {A} {B} day yesterday {C}
Consider the following example: interface IPropertyCollection { public MethodWrapper GetPropertySetterByName(string name); //<<-- I want
Original Question Consider the following scenario: public abstract class Foo { public string Name

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.