rodrigogs / mongoose-timezone

Mongoose plugin to normalize stored dates timezone.
BSD 3-Clause "New" or "Revised" License
15 stars 6 forks source link

Can this be used on an existing dateset? #15

Open syedfaizan opened 4 years ago

syedfaizan commented 4 years ago

Hi OP,

Can this library be used for an already existing database? im having issues getting the right data as the user is in WIB and the database stores date in UTC. please help

rodrigogs commented 4 years ago

If it's already being stored as UTC, it should work.

If the database dates have time offsets applied, then I think the only way would be to create a sort of "migration script" to remove the offsets before using this plugin.