AI Implementation feature(890): Admin Area General Settings and Categories 1.08 (#30)
This commit was merged in pull request #30.
This commit is contained in:
@@ -90,6 +90,21 @@ describe('datetime helpers', () => {
|
||||
it('toIsoUtc returns input verbatim when empty', () => {
|
||||
expect(toIsoUtc('')).toBe('');
|
||||
});
|
||||
|
||||
it('toIsoUtc interprets datetime-local components as UTC regardless of browser timezone', () => {
|
||||
expect(toIsoUtc('2027-03-15T08:30')).toBe('2027-03-15T08:30:00.000Z');
|
||||
expect(toIsoUtc('2027-03-17T16:45')).toBe('2027-03-17T16:45:00.000Z');
|
||||
});
|
||||
|
||||
it('toIsoUtc preserves seconds and milliseconds when present', () => {
|
||||
expect(toIsoUtc('2027-03-15T08:30:15')).toBe('2027-03-15T08:30:15.000Z');
|
||||
expect(toIsoUtc('2027-03-15T08:30:15.123')).toBe('2027-03-15T08:30:15.123Z');
|
||||
});
|
||||
|
||||
it('toIsoUtc round-trips with toDatetimeLocal in UTC', () => {
|
||||
expect(toIsoUtc(toDatetimeLocal('2027-03-15T08:30:00.000Z'))).toBe('2027-03-15T08:30:00.000Z');
|
||||
expect(toIsoUtc(toDatetimeLocal('2027-03-17T16:45:00.000Z'))).toBe('2027-03-17T16:45:00.000Z');
|
||||
});
|
||||
});
|
||||
|
||||
describe('pageTitleError', () => {
|
||||
|
||||
Reference in New Issue
Block a user