may i know is the feature to convert date to UTC before saving to mysql is removed since 0.1.18. It was working fine in 0.1.17. I tried all subsequent version from 0.1.18 onward and none of it is working.
See original GitHub issuemay i know is the feature to convert date to UTC before saving to mysql is removed since 0.1.18. It was working fine in 0.1.17. I tried all subsequent version from 0.1.18 onward and none of it is working.
Issue type:
[✔] question [ ✔] bug report [ ] feature request [ ] documentation issue
Database system/driver:
[ ] cordova
[ ] mongodb
[ ] mssql
[✔ ] mysql
/ mariadb
[ ] oracle
[ ] postgres
[ ] sqlite
[ ] sqljs
[ ] react-native
TypeORM version:
[ ] latest
[ ] @next
[ ✔] 0.1.17
(or put your version here)
link to reference issue #976
Steps to reproduce or a small repository showing the problem:
Issue Analytics
- State:
- Created 5 years ago
- Comments:43 (22 by maintainers)
Top Results From Across the Web
MySQL 5.6 Reference Manual :: 12.7 Date and Time Functions
CONVERT_TZ () converts a datetime value dt from the time zone given by from_tz to the time zone given by to_tz and returns...
Read more >Migrate a MySQL database in a non-UTC time zone using ...
When you use MySQL as a source, the timestamp data isn't migrated properly if your source MySQL instance uses a non-UTC time zone....
Read more >The LPIC-2 Exam Prep - GitHub Pages
Audience: this book is intended to help people prepare for the LPIC-2 exam. You will need to have at least 2 years of...
Read more >Untitled
backport upstream changes for geanygendoc to work with CTPL 0.3 - require and ... upstream release: Geany-Plugins 0.20 - remove unnecessary patches since...
Read more >How to Convert UTC Date To Local time Zone in MySql Select ...
Looks like your mysql timezone table is empty. You have to run mysql_tzinfo_to_sql command for CONVERT_TZ() to work correctly. – ursuleacv. Jun 6,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
i did many round of tests. Below is the minimum changes that required to get it work on 0.1.19 onward process.env.TZ=UTC verified it saves in mysql as UTC and retrieve as UTC perfectly. No need to add tyeporm option timezone.
great, I’m glad it finally works for you. 🎉 to sum it up for others that might have the same issue there are 2 solutions based on the underlying mysql driver in use:
1) with
mysql
:set
timezone
option in typeorm to+0
2) with
mysql2
:run the node process with the timezone environment variable
TZ=UTC
I think you can close the issue now