Questions tagged [timestamp-with-timezone]

A datetime (timestamp in SQL) that is time zone aware, usually by storing time zone information along with the datetime. Data type defined in the SQL standard.

A ( in ) that is aware, usually by storing time zone information along with the datetime.

defined in .

Note that , different from most other s, stores this data type as timestamp in , so that time zone information is not preserved upon retrieval.

496 questions
8
votes
3 answers

How to ignore time-zone on new Date()?

I have JavaScript function called updateLatestDate that receive as parameter array of objects. One of the properties of the object in array is the MeasureDate property of date type. The function updateLatestDate returns the latest date existing in…
Michael
  • 13,950
  • 57
  • 145
  • 288
7
votes
2 answers

Convert timestamp without timezone into timestamp with timezone

I have a column that is of type nullable timestamp without time zone. It is stored in my Postgres database in this format: 2021-06-24 11:00:00. And I would like to convert it to a nullable timestamp with time zone type such that it would be…
Alex Chen
  • 113
  • 1
  • 2
  • 7
7
votes
1 answer

What timezone information does PostgreSQL store?

The PostgreSQL documentation is fairly thorough and useful: https://www.postgresql.org/docs/9.2/datatype-datetime.html#DATATYPE-TIMEZONES but seems to overlook clarity on a rather useful point where clarity might be warranted and help. Having read…
Bernd Wechner
  • 1,854
  • 1
  • 15
  • 32
7
votes
2 answers

timestampTz fields in Laravel

Laravel 5.4 supports the Postgres TIMESTAMP WITH TIME ZONE field type in migrations: $table->timestampTz('scheduled_for'); Laravel can be set up to convert date fields (DATE, DATETIME, TIMESTAMP) into Carbon objects (and does so by default for the…
ceejayoz
  • 176,543
  • 40
  • 303
  • 368
7
votes
1 answer

time zones in POSIXct and xts, converting from GMT in R

I have a bunch of 1 minute returns in an xts object with the index being POSIXct and time zone being GMT. The returns are on NYSE so I would like to convert to the eastern time zone but I would like to take care of the daylight savings time…
Alex
  • 19,533
  • 37
  • 126
  • 195
6
votes
2 answers

How to store OffsetDateTime to PostgreSQL "timestamp with time zone" column

I am trying to store OffsetDateTime("2019-01-14 21:10:00.02+03") with timezone(+03) using JDBC to PostgreSQL. But when retrieve data using sql query I always get the +00 result. Is there any way to store offset (+03) with datetime in postgres ?
sanny
  • 723
  • 2
  • 7
  • 11
5
votes
2 answers

How to set a custom time zone for Lightweight Charts?

I've got a lightweight chart setup that looks like this. I want to add some kind of configuration so that the chart can show me the local time as opposed to the universal time being passed by a Unix timestamp, which is a couple hours offset from…
5
votes
0 answers

How does PostgreSQL know if I currently use DST in TimeZone 'CET'?

I found the following line in my postgresql.conf: timezone = 'CET' And I do also get this by querying the settings: postgres=# show timezone; TimeZone ---------- CET Anyways, we currently still have DST active and following example shows, that…
5
votes
1 answer

pandas to_Datetime conversion with timezone aware index

I have a dataframe with timezone aware index >>> dfn.index Out[1]: DatetimeIndex(['2004-01-02 01:00:00+11:00', '2004-01-02 02:00:00+11:00', '2004-01-02 03:00:00+11:00', '2004-01-02 04:00:00+11:00', '2004-01-02…
dayum
  • 1,073
  • 15
  • 31
5
votes
1 answer

How to get current month firstdate and lastdate in postgres sql query

I want to get first and last dates of current month (Like 30th or 31st).How to get this one by using postgress sql query.
5
votes
2 answers

Oracle timestamp with local time zone values transparent translation

As far as I know, TIMESTAMP WITH LOCAL TIME ZONE values are transparently translated to and from the user's session time zone. But my values read from the database aren't the same as previously inserted. Is there a database or session parameter I…
yallie
  • 2,200
  • 1
  • 28
  • 26
5
votes
2 answers

How to read timezone from 'timestamp with time zone' column?

I am unable to find a way to read timezone value in PostgreSQL column of type timestamp with time zone. JDBC offers method java.sql.ResultSet#getTimestamp(int, java.util.Calendar) but I must provide my own calendar. I have see no way to obtain that…
Bartosz Bilicki
  • 12,599
  • 13
  • 71
  • 113
5
votes
2 answers

How oracle stores timestamp with time zone internally

Based on Oracle document, it stores different parts of timestamp with time zone internally in terms of numbers. I read this article http://www.orafaq.com/wiki/Timestamp which explains the algorithm of internal format of timestamp. So I did a simple…
ivenxu
  • 639
  • 4
  • 16
5
votes
1 answer

Convert datetime object in a particular timezone to epoch seconds in that timezone

eg: >>> print dt 2012-12-04 19:00:00-05:00 As you can see, I have this datetime object How can I convert this datetime object to epoch seconds in GMT -5. How do I do this?
Sagar Hatekar
  • 8,700
  • 14
  • 56
  • 72
5
votes
2 answers

How to pass string with ' ' (timestamp) in prepared statement?

I am trying to execute the following query INSERT INTO hotspot(timestamp) VALUES (timestamp with time zone '2012-10-25 14:00:00 +05:00' at time zone 'EET'); and i want to pass the timestamp as a variable. My timestamp column is type of timestamp…
1
2
3
33 34