Yes, someone actually did this and I found it running on our server

  • Kogasa@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    1 year ago

    IMO every datetime should be in utc, and variables for datetimes should either be suffixed “Utc” or have a type indicating their time zone (DateTimeOffset or UtcDateTime etc). Conversion to local time happens at the last possible second (e.g. in the view model or an outbound http request parameter). Of course that doesn’t solve the problem of interoperating with other morons programmers who don’t follow these rules, but it keeps things a lot neater locally.

    Scheduling based on regional time conventions (holidays, weekends, etc) is just not great though.