Questions tagged [timezone]

A time zone is a designated area on our planet with a consistent, officially established standard time. Each time zone is typically identified by a specific label, such as "America/Los_Angeles". It's important to note that an offset like -07:00 is not the same thing as a time zone; it encompasses much more than just a numerical adjustment. For further information, please refer to the complete tag wiki.

A guide to retrieving the timezone based on a specific address using the Google API

I need to utilize the Google API time zones, which requires geocoding the address to obtain the latitude and longitude for the time zone. How can I achieve this using a value from a textarea? Here are the 2 steps: Convert the textarea value into a geoc ...

Unable to establish the default timezone in PHP

After updating the date.timezone setting in my php.ini file and restarting the php5-fpm process, I noticed that the phpinfo() script still displayed the incorrect timezone: America/New_York. date.timezone = "UTC" Despite confirming that the correct ini f ...

Coordinated Universal Time on the Website

I am currently developing a website that will be exclusively accessible through the intranet, but it targets users across Australia. Recently, I have been instructed to explore the idea of incorporating UTC time on the site. I am contemplating how I can i ...

Utilize moment.js to format a datetime and display the corresponding timezone

I'm having trouble displaying timezones correctly using moment.js. I attempted to use the following code: var result = moment(someDate).format("MM/DD/YYYY HH:mm A Z"); This returns something like: 08/05/2015 06:18 PM +02:00, which is okay, but I w ...

PHP and MySQL: Retrieve data based on user-specified time zones

Within my database, there is a table that tracks hits at different times. An example of this table looks like: id | datetime | ... ----------------------------------- 1 | 2014-05-30 15:19:00 | ... 2 | 2014-06-01 12:14:00 | ... 3 | ...

Differentiating python timezone names

pytz offers a range of timezones such as America/Chicago, America/Los_Angeles, Asia/Kolkata or the tz abbreviation in various formats. I am interested in obtaining the complete names of timezones. Central Standard Time Pacific Standard Time Indian Stand ...

Transforming the timezone of a date from the Backend to the timezone selected by the user in the User

I have an API that provides dates in the format: 12/23/2023 at 03:31 a.m. CST My goal is to convert this to a date with the user-selected timezone in the following format: 12/23/2023 at 7:31 p.m. The timezone part is not required for display in the UI. c ...

After removing the timezone from the timestamp log, why is it now showing as one day behind?

Within my programming, I store a timestamp in the variable 'var timeStamp = finalData.obj.followers[0].timestp;', which currently outputs '2020-04-15T00:00:00.000Z.' To extract only the date and remove the time zone information, I utilized another variabl ...

Dealing with timezone mismatches between Node.js and MySQL databases

I am struggling with the timezone settings on my server. My backend is using Node.js and Express routes for services. I adjusted the server time to the correct one by running: dpkg-reconfigure tzdata I verified that the server time appears accurate. ...

Convert the date into a string format instead of a UTC string representation

I am currently working on a node.js project using TypeScript. In this project, I have a Slot class defined as follows: export class Slot { startTime: Date; constructor(_startTime: Date){ this.startTime = _startTime } } // Within a controller method ...

MongoDB document queries that do not consider timezones

I have some files with dates saved in various time zones' offsets. [ { "ac":ISODate("2019-09-09T18:30:00.000Z") }, { "ac":ISODate("2019-09-09T12:00:00.000Z") }, { "ac":ISODate("2019-09-09T10:00:00.000Z") ...

PHP: Retrieving the current time zone from the database

In my database, I save dates in DATETIME format as Y-m-d H:i:s. My goal is to display the date from the database in the user's local time. For instance, if the user is located in France, I want to show their timezone. Is there a way to accomplish thi ...

Employing the date time difference when considering different time zones

I came across a helpful link earlier on the topic of calculating time differences in minutes, hours, and days: How to get time difference in minutes in PHP Here is an example I was experimenting with: $date1 = new DateTime('first day of this ...

What is the process for configuring a specific timezone in the datetimepicker?

I recently started using the datetimepicker jQuery plugin available at but I am struggling to understand how to incorporate timezone settings. I have reviewed the documentation provided, however, I could not locate any specific instructions regarding tim ...

Is it possible to adjust the timezone settings on my GraphQL timestamp data?

I've come across a lot of helpful information regarding the usage of Date() and timezones, but something seems to be off. In my GraphQL setup (sourcing from Sanity), I have configured it to use formatString in this manner: export default function MinutesIt ...

What strategies can be employed to maintain reliable datetime management for a reservation system operating in diverse time zones?

Looking at the big picture: An interesting scenario arises when a hotel owner specifies a time frame for booking reservations at a restaurant (5pm - 10pm). Along with this information, there is also a timezone provided to ensure that dates are displayed i ...

Switching timezones in PHP programming

Something doesn't quite add up. Let's consider a scenario where my server is set to America/Toronto timezone for storing date/time information. Now, if I need to convert the time for someone on the west coast, I use this code snippet: $timestamp ...

Angular: displaying dates in a specific format while disregarding time zones

Is there a way to format date-time in Angular using DatePipe.format() without converting timezones, regardless of location? For instance, for various examples worldwide (ignoring time differences) I would like to obtain 07/06/2022: console.log('2022-07-06T ...

CodeIgniter throwing a date error when it is being hosted

Attention: The date() function may not work properly due to the system's timezone settings. It is essential to specify the date.timezone setting or utilize the date_default_timezone_set() function. If you are still encountering this warning after implement ...

Tips for transferring TimeZone Name from Angular to .NET API

Currently, the API I am working with accepts TimeZone names (such as America/Denver) as a string. In my Angular UI application, I automatically pass the browser timeZoneName to the API. However, when the API receives the string America/Denver, it interpret ...

A Python Guide: Converting TimeZones to CountryNames or CountryCodes

Is there a faster and more efficient option than the code I'm currently using to extract the name of a country from the name of a city? I want to be able to convert a timezone like 'Europe/Istanbul' to ...

Issue with floating date and time not functioning properly in ICS file for Yahoo Calendar

I have set up a calendar event in Google, Apple, and Yahoo calendars for each individual customer. The event is scheduled based on the customer's address at a specific time, so there should be no need for timezone conversion. However, I encountered an issu ...

PHP CI: Tackling the London Daylight Saving Time Problem

Looking to transform any timezone into the LONDON timezone. Daylight saving time is not being considered at this point. If my current time is: 07-04-2016 03:00 PM, then in LONDON it should be: 07-04-2016 10:30 AM In my situation, it is currently: 07-04-2 ...

Bug in timezone calculation on Internet Explorer 11

I've spent hours researching the issue but haven't been able to find any effective workarounds or solutions. In our Angular 7+ application, we are using a timezone interceptor that is defined as follows: import { HttpInterceptor, HttpRequest, HttpHandler ...

Using Moment.js to showcase historical information within a specified timeframe based on the user's timezone

I'm finding it challenging to properly handle historical data display: Current Situation: The database contains records stored in "YYYY-MM-DD HH:mm:ss" format in UTC+0 (MariaDB - DateTime type) A web application (using moment.js) allows users to select ...

Comparing time across different time zones using Python

I need to schedule daily emails for users at 7am in their respective time zones. For instance, User 1 is in the America/Los_Angeles time zone, while Customer 2 is in America/New_York and would receive the email at 7am their local time, but it would be 4am ...

When provided with varied inputs, new Date() yields distinct values for various time zones

var date1 = "2015-03-29"; console.log(new Date(date1)); //Output:Sun Mar 29 2015 05:30:00 GMT+0530 (India Standard Time) var date2 = "1869-12-31"; console.log(new Date(date2)); //Output:Fri Dec 31 1869 05:53:20 GMT+0553 (India Standard ...

What is the best method for displaying the date/time with timezone in AngularJS?

While utilizing the AngularJS filter date, I have incorporated the following code snippet: var date = new Date("09 apr 2015 12:00:50 UT"); $filter('date')(date, "dd MMM yyyy hh:mm:ss a Z"); The current output is: 09 Apr 2015 08:19:04 PM +5:30 Howe ...

Cookies are failing to be saved upon reloading the page

I found this snippet of code $(document).ready(function () { var d = new Date(); var newMinutes = d.getTimezoneOffset(); var storedMinutes = getCookieValue("tzom"); if (newMinutes != storedMinutes) { setCookie("tzom", newMinutes) ...