FIND YOUR NEXT FEW LINES

Results for “UTC date operations”

Small, practical examples. Search by task or narrow things down below.

395 snippets foundClear filters
Bash ScriptsArguments & decisions

Validate the number of positional arguments

Bash Scripts: Use the argument count to enforce a simple command-line contract.

Bash Scripts✓ Tested
HTMLInput constraints

Validate the shape of an absolute URL

HTML: A URL input checks syntax, not whether a resource exists or is safe.

HTML✓ Tested
GoErrors & validation

Validate UTF-8 bytes

Validate UTF-8 bytes using a complete Go program with explicit sample inputs.

Go✓ Tested
JavaDates & time zones

Convert epoch seconds into an instant

Java: Instant represents a UTC timeline point independent of the default timezone.

Java✓ Tested
C#Dates & precise numbers

Convert Unix seconds to an offset-aware timestamp

C#: DateTimeOffset preserves the UTC offset explicitly.

C#✓ Tested
C#Data & dates

Add calendar days

Use DateOnly for a date without a time zone in C#.

C#✓ Tested
PowerShellFile operations & integrity

Append a line while keeping earlier content

PowerShell: Add-Content appends using an explicitly selected encoding.

PowerShell✓ Tested
PowerShellArray operations

Append an item to a small array

PowerShell: The plus-equals operator builds a new array; use a generic list for repeated large additions.

PowerShell✓ Tested
Bash ScriptsArray operations

Append several items to an array

Bash Scripts: Array-plus-equals adds elements without losing spaces inside a quoted item.

Bash Scripts✓ Tested
Linux CommandsDates & process utilities

Bound a command execution time

Linux Commands: Use timeout and handle status 124 as an expected time limit.

Linux Commands✓ Tested
PowerShellArray operations

Build a mutable generic list

PowerShell: A generic list supports repeated additions without copying an entire array each time.

PowerShell✓ Tested
PowerShellFile operations & integrity

Calculate a file’s SHA-256 digest

PowerShell: Get-FileHash hashes bytes without requiring the caller to load the whole file.

PowerShell✓ Tested