updated timezone/date handling for fields that dont require time data

This commit is contained in:
2026-01-15 22:48:39 -05:00
parent 81bac9bcfb
commit 1c1358f9d0
3 changed files with 31 additions and 8 deletions

View File

@@ -2,7 +2,7 @@ import { BatchPromotion, BatchPromotionMember } from "@app/shared/schemas/promot
import { PromotionDetails, PromotionSummary } from "@app/shared/types/rank"
import pool from "../../db";
import { PagedData } from "@app/shared/types/pagination";
import { toDateTime } from "@app/shared/utils/time";
import { toDate, toDateIgnoreZone, toDateTime } from "@app/shared/utils/time";
export async function getAllRanks() {
const rows = await pool.query(
@@ -40,7 +40,7 @@ export async function batchInsertMemberRank(promos: BatchPromotionMember[], auth
try {
var con = await pool.getConnection();
promos.forEach(p => {
con.query(`CALL sp_update_member_rank(?, ?, ?, ?, ?, ?)`, [p.member_id, p.rank_id, author, author, "Rank Change", toDateTime(new Date(p.start_date))])
con.query(`CALL sp_update_member_rank(?, ?, ?, ?, ?, ?)`, [p.member_id, p.rank_id, author, author, "Rank Change", toDateIgnoreZone(new Date(p.start_date))])
});
con.commit();