List Formatting - Different dates are returned by the getDate operator depending on the time zone of the computer #9618
Labels
Needs: Triage 🔍
Awaiting categorization and initial review.
type:bug-suspected
Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
Declarative list formatting
Developer environment
Windows
What browser(s) / client(s) have you tested
Additional environment details
No response
Describe the bug / error
I have observed that changing the time zone of the computer changes the value retrieved by the getDate operator and also retrieves a different value than the date in the date column.
Related Document: Formatting syntax reference
Steps to reproduce
Setting up a list for verification
Date
in the listChange computer time zone
Change computer time zone from UTC+09:00 to UTC-09:00
![image](https://private-user-images.githubusercontent.com/51254139/319435921-88aeaef7-dee8-493b-b4d9-3c2aa062224f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk2MzM0NTQsIm5iZiI6MTcxOTYzMzE1NCwicGF0aCI6Ii81MTI1NDEzOS8zMTk0MzU5MjEtODhhZWFlZjctZGVlOC00OTNiLWI0ZDktM2MyYWEwNjIyMjRmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI5VDAzNTIzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQyODE0ZGIyNWFkNDU5NzA5OWFlNGZmOTcwYmFlZGFmMjBlZWNhY2E5Y2ExOTJlYWFmN2NiMTZiMmFjZWQwOTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.qppRznQ5A1QbfPffCcuFR9QfNNRgHR_1zNywi_6w0KQ)
When the list is reopened, the value obtained with the getDate operator is not the same as before the time zone change, and is different from the date in the date column
![image](https://private-user-images.githubusercontent.com/51254139/319438900-07546163-4bf6-4255-bc63-148ffbd39fd9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk2MzM0NTQsIm5iZiI6MTcxOTYzMzE1NCwicGF0aCI6Ii81MTI1NDEzOS8zMTk0Mzg5MDAtMDc1NDYxNjMtNGJmNi00MjU1LWJjNjMtMTQ4ZmZiZDM5ZmQ5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI5VDAzNTIzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRmODIyOTQzNmM4NjhlNWY0ODdjMTRiMzA1YjZhY2ExZTlhZDU5YjQzYzk1ZGE4M2UwZTNlZTg0ZjIwMTIwZGYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.vtYcx004SOakgtiDax2UMt1-t7dsikGFWLV0JbgH_zI)
Expected behavior
The
getDate
operator returns the date of the referencing date sequence without being affected by the computer's time zone.The text was updated successfully, but these errors were encountered: