1. Home
  2. Post

The Lorem Ipsum dolor sit et met atat dolor lor

The Lorem Ipsum dolor sit et met atat dolor lor

Symfony Academics Leave a comment 109

The thing to know is that TIMESTAMP data types, NOW(), CURDATE(), CURRENT_TIMESTAMP and so forth are retrieved using the time zone setting. DATETIME and DATE are not. So, your program gets the CURRENT_TIMESTAMP implicitly transforming it to UTC local time, and stores it into your DATETIME column, congealing the time to UTC.

If your program stored it into a TIMESTAMP column the time zone of the stored time would not be congealed. Alternatively, if your program issued the set time_zone = 'Asia/Colombo' command before issuing the query in your question, it would congeal the time into your local time before storing it into your DATETIME column.

The thing to know is that TIMESTAMP data types, NOW(), CURDATE(), CURRENT_TIMESTAMP and so forth are retrieved using the time zone setting. DATETIME and DATE are not. So, your program gets the CURRENT_TIMESTAMP implicitly transforming it to UTC local time, and stores it into your DATETIME column, congealing the time to UTC.

If your program stored it into a TIMESTAMP column the time zone of the stored time would not be congealed. Alternatively, if your program issued the set time_zone = 'Asia/Colombo' command before issuing the query in your question, it would congeal the time into your local time before storing it into your DATETIME column.



about Symfony

I am a programmer with expertise in PHP, Javascript, Python and Java. I offer IT solution at an affordable price. I work locally and internationally.

© Anatomical Society of Nigeria. All rights reserved.

Design by G5 Global

;