localtime()
function localtime(int $timestamp = -1, bool $associative = false): array
Returns the local time.
Parameters:
$timestamp(int), default-1, optional$associative(bool), defaultfalse, optional
Returns: array
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/time/localtime.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how localtime is implemented in the compiler, see the internals page.