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

[BUG] TimeReference.trLocationRef set to Nothing #101

Open
dcastro opened this issue Sep 5, 2023 · 0 comments
Open

[BUG] TimeReference.trLocationRef set to Nothing #101

dcastro opened this issue Sep 5, 2023 · 0 comments
Milestone

Comments

@dcastro
Copy link
Member

dcastro commented Sep 5, 2023

Description

When a time reference has a timezone abbreviation, and is then followed by some text with another timezone abbreviation, TimeReference.trLocationRef is set to Nothing

To Reproduce

This works as expected:

$ parseTimeRefs "MSK 4 pm"
[ TimeReference
    { trText = "MSK 4 pm"
    , trTimeOfDay = 16:00:00
    , trDateRef = Nothing
    , trLocationRef = Just
        ( TimeZoneAbbreviationRef
            ( TimeZoneAbbreviationInfo
                { tzaiAbbreviation = "MSK"
                , tzaiOffsetMinutes = 180
                , tzaiFullName = "Moscow Time"
                }
            )
        )
    }
]

But if we add , GMT at the end, then TimeReference.trLocationRef is set to Nothing.

$ parseTimeRefs "MSK 4 pm, in GMT"
[ TimeReference
    { trText = "MSK 4 pm"
    , trTimeOfDay = 16:00:00
    , trDateRef = Nothing
    , trLocationRef = Nothing
    }
]

Expected behavior

Expected parseTimeRefs "MSK 4 pm, in GMT" to return the same result as parseTimeRefs "MSK 4 pm"

Environment

@dcastro dcastro changed the title [BUG] [BUG] trLocationRef set to Nothing Sep 5, 2023
@dcastro dcastro changed the title [BUG] trLocationRef set to Nothing [BUG] TimeReference.trLocationRef set to Nothing Sep 5, 2023
@dcastro dcastro added this to the v1 milestone Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant