Skip to main content

Questions tagged [timezone]

A time zone is a region on Earth that has a uniform, legally mandated standard time. It is often represented by an identifier, such as "America/Los_Angeles". Note that a numeric modifier such as "-07:00" is an _offset_. A time zone encodes additional details like Daylight Saving Time.

29 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2 votes
0 answers
809 views

Is not having 'named' timezone support common in MySQL?

I'm trying to set the timezone the database uses using: "SET time_zone = 'UTC'; Whilst this works on my development server it doesn't work on my staging server; I get this error: General error: ...
Brett's user avatar
  • 385
1 vote
0 answers
89 views

InfluxDB not returning results when group by time offset at a summer/winter time change

Let's start with an example. I've got an application that logs a point every minute. When I aggregate this data into a query where I'll have the count of logs per day, I get the following result. Keep ...
Ron Nabuurs's user avatar
1 vote
0 answers
161 views

is it possible to set specific timezone for session in mariadb connector/j

I 'm trying to use timezone setting with mariadb connector/J version 3.x. In the documentation,in Timezone consideration, it says: 'a timezone': connector will set connection variable to value. ...
SkyKnight's user avatar
1 vote
0 answers
107 views

Can DST transitions cause "random" query timeouts?

I have encountered a query timeout ("Execution Timeout Expired") on a sub-second query on a connection set to 30 seconds timeouts. Client side logging indicated that 4 days elapsed between ...
Jirka Hanika's user avatar
1 vote
0 answers
70 views

Converting time zones

My SQL Server is located in US Mountain Standard Time where the Daylight Savings is not observed. My office is in US Central time zone. All schedules are kept in Central time by business. I am trying ...
Metaphor's user avatar
  • 906
1 vote
0 answers
553 views

Correcting wrong timezones/timestamps in existing tables

I did a huge mistake because I didn't know how the TIMESTAMPTZ datatype works in postgresql. We need to store sensor data from a handful of different sources. We have a few tables with two timestamp ...
Moritz Roessler's user avatar
1 vote
0 answers
31 views

SET TIME ZONE '-7' vs. AT TIME ZONE '-7'

This is similar to these questions: Why does PostgreSQL interpret numeric UTC offset as POSIX and not ISO-8601? Strange UTC offset time zone parsing in Postgres I'm running Postgres 10.3. As per the ...
ben-pdc's user avatar
  • 11
1 vote
1 answer
5k views

timestamp with timezone issue with TZR vs TZH:TZM

I have a Hibernate with Oracle JDBC based application inserting/updating into the following column; COLUMN_A TIMESTAMP WITH TIME ZONE DEFAULT systimestamp NOT NULL but while it automatically appends ...
buræquete's user avatar
1 vote
0 answers
208 views

Grouping time-series data by time intervals

Let's say we are storing data for 1000s of devices that collect a single type of data every 10s. Each device can be located in a different timezone. The ability to query quickly to visualize the data ...
James Fazio's user avatar
1 vote
0 answers
153 views

Time series data and utc conversion

I'm storing data in minute, hour, day, month and year buckets. All data is stored in UTC. Let's assume a client is in PDT time (-07:00 UTC) If the client wants to query for the hour sum of 4/23/2016 ...
James Fazio's user avatar
1 vote
0 answers
87 views

The time is wrong in MySQL "data/*.err" file

I use "select now();" in MySQL client, the return time is right, is my system time. But the time in the "data/g1.err" is wrong, the "g1" is my computer name. The time's minute is right, so I think ...
Lee Li's user avatar
  • 111
1 vote
0 answers
504 views

mysql datetime timezone +0000

I've got a Twitter database and some columns in multiple tables are time-stamps like: Tue Sep 09 23:48:37 +0000 2014 These columns are TEXT so I want to convert them. I read Date and Time Types, ...
leoce's user avatar
  • 143
0 votes
1 answer
14 views

MySQL timezone tables: mysql_tzinfo_to_sql docs are incorrect

A basic installation of MySQL creates, but does not populate, the several timezone-related tables in database "mysql". To populate those tables, you might consult: https://dev.mysql.com/doc/...
gwideman's user avatar
  • 101
0 votes
0 answers
48 views

Relationship between /etc/localtime and Etc/UTC in PostgreSQL

I run our company's DBMS in containers, and when creating a container, the ansible deployment role mounts the host file /etc/localtime along the same path into the container (although, as far as I ...
strafer's user avatar
0 votes
1 answer
15 views

Postgres: any traps when adding tables with `timestamptz` fields, when existing tables all use `timestamp`?

Similarly as in Convert Postgres TIMESTAMP to TIMESTAMPTZ, but with the difference that I don't plan to modify existing table's timestamp columns. Are there any gotchas when using timestamptz for new ...
VanillaDonuts's user avatar
0 votes
0 answers
38 views

Why a postgreSQL timestamp with time zone at a certain time zone is printed without the time zone

When I ask PostgreSQL for a timestamp with time zone at a certain time zone, it does not print the time zone: SELECT now()::timestamp WITH TIME ZONE AT TIME ZONE 'CST'; timezone --...
s.k's user avatar
  • 372
0 votes
0 answers
395 views

TimeZone Setting On PostgreSQL Databases

I have a Patroni cluster with two Ubuntu 22 db server. The timezone of my instances was set to UTC. I have needed to edit them to set the local timezone to Europe/Istanbul. I have made the timezone ...
user avatar
0 votes
0 answers
89 views

MySQL System Timezone using Abbreviation (AST) vs Olson Timezone (America/Curacao)

I am working on a MySQL 5.7.41-44 instance running on a CentOS server. The Linux timezone (per timedatectl) is America/Curacao (AST, -0400). The MySQL @@system_time_zone returns AST (and not America/...
GWR's user avatar
  • 2,817
0 votes
1 answer
35 views

How to express dates for display in neighboring timezones?

I run a toy database where users can browse around, find toys they own, and "add them to their collection". On the back end, I add a row to a dedicated MYSQL table with data about the ...
Max L's user avatar
  • 1
0 votes
1 answer
1k views

How to get current date and time in Elasticsearch

I need to review the current date and time zone from Elasticsearch. I'm checking the elastic documentation and it mentioned that the default value is UTC. In other environments I use: SELECT NOW(); ...
Carolina's user avatar
0 votes
1 answer
1k views

Java PostgreSQL library seems to convert dates to local time zone automatically

PostgreSQL 14.6 Ubuntu 22.04 I am using postgresql-42.5.4.jar which I downloaded from pgJDBC. I use this library to get data from a database and display it on a website running locally. The web server ...
Zephyrus's user avatar
  • 301
0 votes
0 answers
872 views

PostgreSQL COALESCE arguments change resulting timezone for DateTime

I have strange behaviour of COALESCE function of PostgreSQL. Depending on arguments of this function the result is different: SELECT "CreatedOn", -- 7/24/2020 8:15:03 AM COALESCE(&...
Artem Repko's user avatar
0 votes
1 answer
61 views

Date calculations give different results in different environments

This query: WITH RECURSIVE cte AS ( SELECT 0 n UNION ALL SELECT n + 1 FROM cte WHERE n < 20) SELECT n, ('2020-04-13 00:00:00 Europe/Berlin'::timestamptz - make_interval(days => ...
AndreKR's user avatar
  • 587
0 votes
0 answers
1k views

Compare datetimes with dfferent timezones in MySQL

I have a field `opened_at` in MySQL table that stores datetimes in string format with different timezones: 2021-01-30T18:07:40+02:00 2021-01-31T01:32:40+05:00 2021-01-31T21:17:40+03:00 etc. I need to ...
Ivan Olshansky's user avatar
0 votes
0 answers
182 views

Syntax error around converting timestamps to time

I am writing a function that requires some comparison between the difference date and time parts of the timestamp data type. However it keeps running into syntax errors and I cannot find out what is ...
Prashin Jeevaganth's user avatar
0 votes
1 answer
40 views

Can I refuse inserts/updates with timestamps without time-zone in postgresql?

I use exclusively timestamps with time-zone in PostgreSQL, but I just noticed something slightly worrying: If a client inserts/updates a record with a naïve time-stamp, PostgreSQL falls back to a ...
exhuma's user avatar
  • 751
0 votes
0 answers
528 views

MySQL event scheduler -- Event running at wrong time

I have created a event to run EVERY 1 DAY at 3:15 (am). I know that timezones affects events and actually I create a query to check the START time in mysql.event (GMT timezone) and information_schema....
Jesus Uzcanga's user avatar
0 votes
0 answers
358 views

In mysql system_time_zone doesn't reflects DST changes, isn't it a bug?

If a Ubuntu machine was in 'PST' timezone and on 10 march 2019 at 2:00 AM its timezone gets changed to 'PDT' timezone to accommodate DST changes then does this change is immediately reflected in ...
sactiw's user avatar
  • 101
0 votes
1 answer
720 views

MySQL - Turkey/Istanbul Daylight Saving Time Change

Until this year Turkey was using daylight saving time, staying UTC+2 on winter period, UTC+3 on summer. This year it is decided to stay only in UTC+3. Our DateTime's are persisted on MySQL (5.26.34) ...
ayyayyekokojambo's user avatar