feature: recording expiration to respect timezones
See original GitHub issueDescription
The startedDateTime
is a timestamp but does not include timezone information.
This could lead to potential problems with expiration calculation.
Example situation:
- User A records a network call in GMT -05:00
expiresIn
is set to e.g 3 days- User B replays a network call in GMT +7:00, 2.5 days later
The request will expire since startedDateTime
will be converted to the local timezone.
Another example would be running code with Polly on CI which hosts servers on a different timezone than your machine. This way you could get inconsistent results compared to localhost.
Suggested solution
It would be good to save the timezone information into the startedDateTime
in the har file (or any other persister format), so it can be parsed together with the timestamp & current time converted to the timezone of the recording for comparison to get consistent results regardless of the location.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
Manage meeting policies for recording and transcription
All newly created meeting recordings will have a default expiration of 120 days; all recordings created after this feature was turned on ...
Read more >Working with Time Zones - W3C
This document contains guidelines and best practices for working with time and time zones in applications and document formats.
Read more >SharePoint Online: Change Time Zone using PowerShell
Runtime.dll" #function to change Timezone regional settings of a SharePoint Online site ... Microsoft Teams: Change Meeting Recording Expiration Policy.
Read more >RFC 7808: Time Zone Data Distribution Service
TXT Records for a Time Zone Data Distribution Service . ... down into a set of "actions" that define the overall function being...
Read more >Supported Time Zones - Salesforce Help
Required Editions and User Permissions ; GMT+03:00, Volgograd Standard Time (Europe/Volgograd) ; GMT+03:00, East Africa Time (Indian/Antananarivo) ; GMT+03:00 ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jasonmit @sankaritan
Please correct me if I’m wrong, but it looks like the request timestamp -
startedDateTime
- is already being saved as UTC usingnew Date().toISOString()
. Then in is-expired.js, thisrecordedOn
timestamp withexpiresIn
is converted to local timezone and compared against local time. Happy to tackle the issue, but need more clarification.Closing as it appears to have gone stale.
If it’s still an issue in the future, please open a new issue instead of responding on closed issue.