Results for “OFFSET”
Small, practical examples. Search by task or narrow things down below.
Convert a timestamp to a different fixed offset
C#: ToOffset changes the displayed local time while retaining the same instant.
C#✓ Tested
Convert an aware datetime to another offset
Python: Use astimezone for conversion; replacing tzinfo alone does not convert an instant.
Python✓ Tested
Convert Unix seconds to an offset-aware timestamp
C#: DateTimeOffset preserves the UTC offset explicitly.
C#✓ Tested
Display an instant at a fixed offset
Display an instant at a fixed offset using a complete Go program with explicit sample inputs.
Go✓ Tested
Extract a substring by offset and length
Bash Scripts: Bash substring offsets start at zero for an ordinary string.
Bash Scripts✓ Tested
Read bytes from a chosen file offset
C: Check fseek before reading so an unsupported or invalid seek is not ignored.
C✓ Tested
Page an ordered result
Skip rows and fetch a bounded page.
OFFSET✓ Tested
Read an element’s document coordinates
jQuery: offset returns coordinates relative to the document.
jQuery✓ Tested
Replace bytes at a known position in a binary file
C: Open in update mode and seek before writing a fixed-size replacement.
C✓ Tested
Apply a linear sensor calibration
Arduino / C: Convert a raw reading using an offset and scale measured for the sensor.
Arduino / C✓ Tested
Convert an instant to a regional timezone
Java: Use ZonedDateTime with a named zone to apply that zone’s offset rules.
Java✓ Tested
Convert Unix seconds into an aware UTC timestamp
PowerShell: DateTimeOffset.FromUnixTimeSeconds creates a value with an explicit UTC offset.
PowerShell✓ Tested