01 / TIME
Working with timestamps
A clock reading and a moment in time are not the same thing. A value such as 09:30 needs a date and a time zone before it identifies a particular moment. Even then, the transition out of daylight saving time can make a local time occur twice.
For records that need to be compared across machines, include an explicit offset. In an RFC 3339 timestamp, the final Z means UTC. An offset such as +08:00 describes how the displayed local time relates to UTC at that moment.
An offset is not a time zone. A named zone, such as America/Los_Angeles, includes rules that can vary over time. For a recurring appointment, retain the intended local time and the zone; for an event that already happened, retain the instant.
Read further: RFC 3339 and the IANA Time Zone Database.
02 / FILES
What a checksum tells you
A cryptographic hash turns a sequence of bytes into a fixed-size value. With SHA-256, a changed byte will overwhelmingly likely produce a different digest. Comparing digests is useful when checking that a download or a copied file matches a known reference.
The reference matters. A matching hash does not establish who made a file, whether the program is safe, or whether the reference itself can be trusted. Someone who replaces both a download and the checksum beside it can make them agree.
On macOS, shasum -a 256 filename prints a SHA-256 digest. Compare the complete value against a trusted source. A signed release can add an authenticity check, provided the signing key is independently trusted.
Read further: the NIST hash functions overview.
03 / TEXT
Text is bytes plus an encoding
A text file contains bytes. An encoding specifies how those bytes represent characters. UTF-8 uses between one and four bytes for a Unicode scalar value, so byte counts and character counts often differ.
What a reader sees as one character may itself contain several code points. An accented letter can sometimes be represented by a precomposed code point or by a base letter followed by a combining mark. Visually identical strings therefore need not have identical bytes.
Declare the encoding when writing files and serving web pages. If text looks corrupted, check how the bytes were decoded before replacing characters by hand. Where comparison requires normalization, select a Unicode normalization form deliberately; normalization is not a substitute for decoding correctly.
Read further: Unicode encoding FAQ and Unicode normalization forms.