obsidian-linter
obsidian-linter copied to clipboard
Basic implementation of YAML timestamp UTC option
Fixes #1069.
This is my rough attempt at implementing a option to convert YAML timestamps from local time to UTC time. I've added a few tests, but I'm unsure of their coverage / if any additional ones are needed. Happy to take any feedback and rework my implementation if desired.
When creation date retention is enabled and the format string does not include time zone info, this implementation assumes the existing creation date is already in UTC (no change). If the format string does include time zone info, the existing creation date is in a local time, and the UTC option is subsequently enabled, then the existing date created will be converted to UTC on next lint.