send date as UTC for details endpoint

This commit is contained in:
Dan Percic 2022-10-13 13:50:56 +03:00
parent e9c68a0f87
commit 5ea75f1f05

View File

@ -17,19 +17,13 @@ export interface QueryParam {
readonly value: string | number | boolean;
}
function getCurrentDate() {
const date = new Date();
date.setHours(date.getHours() + Math.abs(date.getTimezoneOffset() / 60));
return date.toISOString();
}
/**
* I for interface,
* R for response
*/
export abstract class GenericService<I> {
protected readonly _http = inject(HttpClient);
protected readonly _lastCheckedForChanges = new Map<string, string>([[ROOT_CHANGES_KEY, getCurrentDate()]]);
protected readonly _lastCheckedForChanges = new Map<string, string>([[ROOT_CHANGES_KEY, new Date().toISOString()]]);
protected abstract readonly _defaultModelPath: string;
get<T = I[]>(): Observable<T>;