common

package
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCurrentDateUTC

func GetCurrentDateUTC() time.Time

GetCurrentDateUTC returns the current date in UTC, truncated to midnight (00:00:00). This matches PostgreSQL's DATE() function behavior for consistency.

Example:

  • Input: 2025-10-17 14:23:45 UTC
  • Output: 2025-10-17 00:00:00 UTC

Usage: Use this for daily increment client-side date checking to ensure consistency with SQL DATE() function in BatchIncrementProgress queries.

func TruncateToDateUTC

func TruncateToDateUTC(t time.Time) time.Time

TruncateToDateUTC truncates the given time to midnight (00:00:00) in UTC. This matches PostgreSQL's DATE() function behavior for consistency.

Example:

  • Input: 2025-10-17 14:23:45 UTC
  • Output: 2025-10-17 00:00:00 UTC

Usage: Use this for comparing timestamps in bufferIncrementDaily with today's date.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL