Tag Info

New answers tagged

2

There is no difference. Three quotes from the documentation: 1) These SQL-standard functions all return values based on the start time of the current transaction: ... CURRENT_TIMESTAMP ... 2) transaction_timestamp() is equivalent to CURRENT_TIMESTAMP, but is named to clearly reflect what it returns. 3) now() is a traditional ...


0

TIMESTAMP stores the number of seconds from 1970-01-01 00:00:01 to now. It automatically converts to the date and time format when you retrieve the data. CURRENT_TIMESTAMP(): Returns the current date time with your timezone configured. UTC_TIMESTAMP(): Returns the current date and time using UTC timezone. If you're using a timezone that's not UTC, these ...


0

If you use current_timestamp, MySQL will use timezone which is configured in my.cnf. If no value is set in my.cnf, then MySQL will determine your operating systems' timezone and use that upon startup. You can see how your server is configured with this query: mysql> SELECT @@global.time_zone, @@session.time_zone; Also, it is possible to set timestamp ...



Top 50 recent answers are included