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 with unix_timestamp().
Values
pub fn now() -> Int
Returns the current Unix timestamp in seconds since epoch. Use this for storing timestamps in database columns with the unix_timestamp() schema type.
Example:
let created_at = unix_timestamp.now()
// => 1734700800