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
234
votes
16 answers

Parse date without timezone javascript

I want to parse a date without a timezone in JavaScript. I tried: new Date(Date.parse("2005-07-08T00:00:00+0000")); Which returned Fri Jul 08 2005 02:00:00 GMT+0200 (Central European Daylight Time): new Date(Date.parse("2005-07-08 00:00:00…
Athlan
  • 6,389
  • 4
  • 38
  • 56
128
votes
4 answers

How to remove timezone from a Timestamp column in a pandas dataframe

I read Pandas change timezone for forex DataFrame but I'd like to make the time column of my dataframe timezone naive for interoperability with an sqlite3 database. The data in my pandas dataframe is already converted to UTC data, but I do not want…
Dave X
  • 4,831
  • 4
  • 31
  • 42
37
votes
6 answers

Java Convert GMT/UTC to Local time doesn't work as expected

In Order to show a reproducible scenario, I am doing the following Get the current system time (local time) Convert Local time to UTC // Works Fine Till here Reverse the UTC time, back to local time. Followed 3 different approaches (listed below)…
32
votes
5 answers

converting to timestamp with time zone failed on Athena

I'm trying to create to following view: CREATE OR REPLACE VIEW view_events AS ( SELECT "rank"() OVER (PARTITION BY "tb1"."innerid" ORDER BY "tb1"."date" ASC) "r" , "tb2"."opcode" , "tb1"."innerid" , "tb1"."date" ,…
Gal Itzhak
  • 449
  • 1
  • 7
  • 14
24
votes
2 answers

How can i insert timestamp with timezone in postgresql with prepared statement?

I am trying to insert to a timestamp with timezone field of my DB a string which includes date, time and timezone using prepared statement. The problem is that Timestamp.valueof function does not take into consideration the time zone that the string…
23
votes
1 answer

Date and time in UTC - how to store them in postgres?

I am getting my data: date and time in UTC, in a csv file format in separate columns. Since I will need to convert this zone to date and time of the place where I live, currently in summer to UTC+2, and maybe some other zones I was wondering what is…
mycupoftea
  • 361
  • 1
  • 3
  • 8
20
votes
1 answer

Instant vs ZonedDateTime

I just do not quite understand which one of those two I should use for the following example: We have an OfferEntity which has a member availableDay which is the date at which the offer is available. Now, the table will look something like…
17
votes
3 answers

ORACLE Casting DATE to TIMESTAMP WITH TIME ZONE WITH OFFSET

I need to cast a DATE value in a query to a TIMESTAMP WITH TIME ZONE, but currently I'm getting the TimeZone Region ('Europe / Paris') which is not valid to be used by EF. For example, when doing this: select CAST(FECHA AS TIMESTAMP WITH TIME ZONE)…
Farlop
  • 690
  • 1
  • 6
  • 20
15
votes
2 answers

Converting Between Timezones in Postgres

I am trying to understand the timestamps and timezones in Postgre. I think I got it, until I red this article. Focus on the "Converting Between Timezones" part. It has two examples. (Consider the default timezone configuration to be UTC.) Example…
slevin
  • 4,166
  • 20
  • 69
  • 129
13
votes
1 answer

Select timestamp with time zone, but ignore seconds

I'm selecting a timestamptz from a PosgreSQL database. I want my SELECT to return only the date, hours and minutes. No seconds. Can I set the date format in my psql SELECT to accommodate this?
Ben Walker
  • 2,037
  • 5
  • 34
  • 56
11
votes
3 answers

Convert `Java.lang.String` TO `oracle.sql.TIMESTAMPTZ`

I have these following Java.lang.String values that represents String value of TIMESTAMPTZ. I need to convert these Java.lang.String TO oracle.sql.TIMESTAMPTZ. "2016-04-19 17:34:43.781 Asia/Calcutta", "2016-04-30 20:05:02.002 8:00", "2003-11-11…
11
votes
3 answers

getting time difference with string like "A minute ago" or "An hour ago" on Android

i have this code in my PHP function nicetime($date) { date_default_timezone_set("Asia/Taipei"); if(empty($date)) { return "No date provided"; } $periods = array("second", "minute", "hour", "day", "week", "month", "year",…
Smough
  • 202
  • 1
  • 2
  • 11
10
votes
3 answers

Compare Timestamp with date in sequelize query

I have createdAt column which stores value as "2018-11-07 15:03:16.532+00". I want to write query like select * from table_name where createdAt = input_date, where myinput_date is only date value like 2018-11-07. How do i write this query using…
10
votes
3 answers

Google timezone API - timestamp parameter

In my client application I have the Latitude & longitude information from skyhook API based on its I.P. Now based on the latitude and longitude information I need to find out the timezone information of the client. But in the google timezone API…
user2274857
  • 101
  • 1
  • 4
9
votes
2 answers

Is UNIX time universal

I did some research on internet but still confused. Is UNIX time universal time like GMT/UTC or does it vary from place to place like a local time? I know UNIX time is counted from 1st Jan, 1970 00:00:00 GMT. When I use getTime() function in Java…
user4213837
  • 185
  • 1
  • 2
  • 14
1
2 3
33 34