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
Description
When a time reference has a timezone abbreviation, and is then followed by some text with another timezone abbreviation,
TimeReference.trLocationRefis set toNothingTo Reproduce
This works as expected:
But if we add
, GMTat the end, thenTimeReference.trLocationRefis set toNothing.Expected behavior
Expected
parseTimeRefs "MSK 4 pm, in GMT"to return the same result asparseTimeRefs "MSK 4 pm"Environment