glimr/utils/unix_timestamp
Unix Timestamp Utils
Convenience functions for working with Unix timestamps. Returns the current time as integer seconds or nanoseconds since the Unix epoch (January 1, 1970). Useful for storing timestamps in database columns defined with unix_timestamp().
Values
pub fn now() -> Int
Now (Seconds)
Returns the current Unix timestamp in seconds since epoch. Use this for storing timestamps in unix_timestamp() columns.
Example:
let created_at = unix_timestamp.now()
// => 1734700800