updated timezone/date handling for fields that dont require time data
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user