This Open WebUI function automatically adds contextual date and time information to each message, providing the AI model with current temporal context.
You can configure the function using valves:
DATETIME_TIMEZONE_HOURS: Timezone offset hours (default: 0)DATETIME_TIMEZONE_MINUTES: Timezone offset minutes (default: 0)DATETIME_SOUTHERN_HEMISPHERE: Set to "true" if in Southern Hemisphere (default: "false")DATETIME_TIMEZONE_HOURS=5
DATETIME_TIMEZONE_MINUTES=30
DATETIME_SOUTHERN_HEMISPHERE=false
DATETIME_SOUTHERN_HEMISPHERE to "true"Current date is Friday, April 18, 2025, Spring, Morning, the user time is 10:30:45 UTC+5:30
MIT License
Benas Raudys (https://github.com/benasraudys)
Open WebUI Enterprise — White-labeling, SSO, and dedicated support for your team.