#dates 4 articles
A file's time is not its item's time – a copy job carries the item time, and ListItemAllFields returns dates in the web's zone without "Z" gotchas / rest-api TimeCreated/TimeLastModified of a file can differ from the item's Created/Modified by seconds or years; copy jobs carry the item time, so compare items – and read them from /items(id) (UTC), because ListItemAllFields… Created/Modified on a document library won't stick — and the API says 200 while ignoring you gotchas / lists A plain MERGE reports 204 and SharePoint overwrites both with "now"; ValidateUpdateListItem + bNewDocumentUpdate is the only path that holds, it wants the web's locale format (the error message tells you which), reads… List item versions come back newest-first and include the current one – the opposite of file versions gotchas / rest-api items(id)/versions is DESCENDING and its first row is the current version (IsCurrentVersion: true) – the opposite of file /Versions; Created on a version is UTC WITHOUT the Z, so new Date() shifts it by the browser… Setting process.env.TZ inside Jest does not change the time zone gotchas / tooling A test, setupFiles and setupFilesAfterEnv write into the sandbox's copy of process.env, so day-boundary tests pass only on machines already in the right zone; pin it in globalSetup, assert the offset, and run once…