I have maintained internationalisation, who knows I may travel again one day, of all my dates by setting them with the UTC flag, just as for created and modified. So please consider a due-date or done-date are in UTC.
- It is easy enough to format these for display as they are converted to local time
However I am getting confused when trying to test if a given date is Today, when Now returns the local time, and my fields contain UTC times. For me at +11 UTC part of the day is the same today and the other part of the day is not.
Does anyone have a code pattern to do this comparison?
- Keep in mind I want to do this against various date fields so need to pass that in as a parameter and may at some point want to compare other local times with UTC encoded date/time stamps.
- Part of the problem is some of the documentation is silent on this issue.