How to get the Australian Time Zone using Javascript

0 votes

I am trying to help a friend to get the Australian Time Zone for the University Assignment and finding difficulty. Could someone point us in the right direction? Thank you!

<script>
function Timezone() {
var x = new Date();
var currentTimeZoneOffsetInHours = x.getTimezoneOffset() / 60;
document.getElementById("add").innerHTML = currentTimeZoneOffsetInHours;
}
</script>

<p id="add"></p>

Jul 19, 2022 in Web Development by gaurav
• 23,260 points
1,356 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
let AuDate = new Date().toLocaleTimeString("en-US", {timeZone: "Australia/Sydney",hour: '2-digit', minute:'2-digit',hour12:false });
answered Aug 29, 2022 by anonymous

edited Mar 5

Related Questions In Web Development

0 votes
1 answer
0 votes
1 answer

How to upload zip from the S3 bucket to lambda function using AWS CLI

Hi@Abhishek, You want to upload your zip file ...READ MORE

answered Apr 10, 2020 in Web Development by MD
• 95,460 points
6,010 views
0 votes
1 answer

How to create a simple map using JavaScript/JQuery

var map = new Object(); // or ...READ MORE

answered Jun 27, 2022 in Web Development by rajatha
• 7,680 points
1,495 views
0 votes
0 answers

How to get mobile number from facebook login using jquery?

I am trying to work facebook login ...READ MORE

Jul 19, 2022 in Web Development by gaurav
• 23,260 points
921 views
0 votes
0 answers

How to convert UTC to CST using Javascript or Jquery

I would like to convert the below ...READ MORE

Aug 11, 2022 in Web Development by gaurav
• 23,260 points
1,575 views
0 votes
1 answer

Convert GMT to IST (India Standard Time) using javascript?

You can specify an IANA time zone ...READ MORE

answered Nov 7, 2022 in Java by Damonlang
• 700 points
21,688 views
0 votes
1 answer

Does Python's time.time() return the local or UTC timestamp?

The time.time() function returns the number of seconds since ...READ MORE

answered Oct 5, 2018 in Python by SDeb
• 13,300 points
1,259 views
0 votes
1 answer

Does Python's time.time() return the local or UTC timestamp?

The time.time() function returns the number of seconds since ...READ MORE

answered Nov 14, 2018 in Python by charlie_brown
• 7,720 points
5,549 views
0 votes
1 answer

Is a specific timezone using DST right now?

You can try the following; from pytz import ...READ MORE

answered Aug 9, 2019 in Python by SDeb
• 13,300 points
735 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP