Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable dateField to put a timestamp with a local time zone #458

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Enable dateField to put a timestamp with a local time zone #458

wants to merge 8 commits into from

Conversation

mnacamura
Copy link

I noticed that dateField enforces putting timestamps with UTC time. However, one may want to use a local time offset; at least I want to do so ;)
This PR achieves it.

@jaspervdj
Copy link
Owner

This looks more or less good. Suggestions:

  1. I would put the TimeLocale as Maybe TimeLocale in FeedConfiguration. Then, I would also add a defaultFeedConfiguration which sets this to Nothing (yes, I'm aware that this is a breaking change but it should be easy to fix for people).

  2. Remove the DateFormat from the dateField function and just use the default one there.

  3. Add a record which bundles up the settings for dateFieldWith:

    data DateFieldConfiguration = DateFieldConfiguration
        { dfcOutputTimeLocale :: TimeLocale
        , dfcDateFormat :: DateFormat
        }
    

I hope these changes make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants