import { MAJOR_VERSION, RELEASE_FLAG } from "../config";

const buildDate = new Date();
export const buildTime = buildDate.toISOString();
export const buildTimeUTC = buildDate.toLocaleString('en-US', {
    timeZone: 'UTC',
    dateStyle: 'medium',
    timeStyle: 'short',
});

// Generate a short hex build ID from timestamp
const now = Date.now();
export const buildNumber = now.toString(16).slice(-6);
export const fullBuildNumber = RELEASE_FLAG && RELEASE_FLAG.length 
    ? `${MAJOR_VERSION}.${buildNumber} (${RELEASE_FLAG})` 
    : `${MAJOR_VERSION}.${buildNumber}`;