1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-03-11 14:59:21 +02:00

Use of offset value in the UI (#5)

Added recognition of the offset value in the UI. It will be displayed if available.

Caveat: Search will not take offset into account. A new year's picture taken in Sydney the 1st of January 2019 00:15:00 GMT+11, is technically taken in 31st of December 2018 in UTC. Therefore this picture won't show of in seaches where the after: parameter is set to 1st of january 2019.

This is both correct and wrong at the same time.

UTC-wise it is correct, local time it is not correct. I guess most people would find local time most untuitive, so there is room for improvement of the search. :)
This commit is contained in:
grasdk 2024-02-16 19:17:31 +01:00 committed by GitHub
parent 49e861d358
commit 5e94220d6d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
19 changed files with 975 additions and 959 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

File diff suppressed because it is too large Load Diff

View File

@ -5,6 +5,7 @@ import {MediaDTOWithThPath, Messenger} from './Messenger';
import {backendTexts} from '../../../common/BackendTexts'; import {backendTexts} from '../../../common/BackendTexts';
import {DynamicConfig} from '../../../common/entities/DynamicConfig'; import {DynamicConfig} from '../../../common/entities/DynamicConfig';
import {DefaultMessengers} from '../../../common/entities/job/JobDTO'; import {DefaultMessengers} from '../../../common/entities/job/JobDTO';
import {Utils} from '../../../common/Utils';
export class EmailMessenger extends Messenger<{ export class EmailMessenger extends Messenger<{
emailTo: string, emailTo: string,
@ -69,7 +70,7 @@ export class EmailMessenger extends Messenger<{
(media[i].metadata as PhotoMetadata).positionData?.country : (media[i].metadata as PhotoMetadata).positionData?.country :
((media[i].metadata as PhotoMetadata).positionData?.city ? ((media[i].metadata as PhotoMetadata).positionData?.city ?
(media[i].metadata as PhotoMetadata).positionData?.city : ''); (media[i].metadata as PhotoMetadata).positionData?.city : '');
const caption = (new Date(media[i].metadata.creationDate)).getFullYear() + (location ? ', ' + location : ''); const caption = Utils.getFullYear(media[i].metadata.creationDate, media[i].metadata.creationDateOffset) + (location ? ', ' + location : '');
attachments.push({ attachments.push({
filename: media[i].name, filename: media[i].name,
path: media[i].thumbnailPath, path: media[i].thumbnailPath,

View File

@ -1,286 +1,286 @@
import {AuthenticationMWs} from '../middlewares/user/AuthenticationMWs'; import {AuthenticationMWs} from '../middlewares/user/AuthenticationMWs';
import {Express} from 'express'; import {Express} from 'express';
import {GalleryMWs} from '../middlewares/GalleryMWs'; import {GalleryMWs} from '../middlewares/GalleryMWs';
import {RenderingMWs} from '../middlewares/RenderingMWs'; import {RenderingMWs} from '../middlewares/RenderingMWs';
import {ThumbnailGeneratorMWs} from '../middlewares/thumbnail/ThumbnailGeneratorMWs'; import {ThumbnailGeneratorMWs} from '../middlewares/thumbnail/ThumbnailGeneratorMWs';
import {UserRoles} from '../../common/entities/UserDTO'; import {UserRoles} from '../../common/entities/UserDTO';
import {ThumbnailSourceType} from '../model/fileaccess/PhotoWorker'; import {ThumbnailSourceType} from '../model/fileaccess/PhotoWorker';
import {VersionMWs} from '../middlewares/VersionMWs'; import {VersionMWs} from '../middlewares/VersionMWs';
import {SupportedFormats} from '../../common/SupportedFormats'; import {SupportedFormats} from '../../common/SupportedFormats';
import {ServerTimingMWs} from '../middlewares/ServerTimingMWs'; import {ServerTimingMWs} from '../middlewares/ServerTimingMWs';
import {MetaFileMWs} from '../middlewares/MetaFileMWs'; import {MetaFileMWs} from '../middlewares/MetaFileMWs';
import {Config} from '../../common/config/private/Config'; import {Config} from '../../common/config/private/Config';
export class GalleryRouter { export class GalleryRouter {
public static route(app: Express): void { public static route(app: Express): void {
this.addGetImageIcon(app); this.addGetImageIcon(app);
this.addGetVideoIcon(app); this.addGetVideoIcon(app);
this.addGetResizedPhoto(app); this.addGetResizedPhoto(app);
this.addGetBestFitVideo(app); this.addGetBestFitVideo(app);
this.addGetVideoThumbnail(app); this.addGetVideoThumbnail(app);
this.addGetImage(app); this.addGetImage(app);
this.addGetVideo(app); this.addGetVideo(app);
this.addGetMetaFile(app); this.addGetMetaFile(app);
this.addGetBestFitMetaFile(app); this.addGetBestFitMetaFile(app);
this.addRandom(app); this.addRandom(app);
this.addDirectoryList(app); this.addDirectoryList(app);
this.addDirectoryZip(app); this.addDirectoryZip(app);
this.addSearch(app); this.addSearch(app);
this.addAutoComplete(app); this.addAutoComplete(app);
} }
protected static addDirectoryList(app: Express): void { protected static addDirectoryList(app: Express): void {
app.get( app.get(
[Config.Server.apiPath + '/gallery/content/:directory(*)', Config.Server.apiPath + '/gallery/', Config.Server.apiPath + '/gallery//'], [Config.Server.apiPath + '/gallery/content/:directory(*)', Config.Server.apiPath + '/gallery/', Config.Server.apiPath + '/gallery//'],
// common part // common part
AuthenticationMWs.authenticate, AuthenticationMWs.authenticate,
AuthenticationMWs.normalizePathParam('directory'), AuthenticationMWs.normalizePathParam('directory'),
AuthenticationMWs.authorisePath('directory', true), AuthenticationMWs.authorisePath('directory', true),
VersionMWs.injectGalleryVersion, VersionMWs.injectGalleryVersion,
// specific part // specific part
GalleryMWs.listDirectory, GalleryMWs.listDirectory,
ThumbnailGeneratorMWs.addThumbnailInformation, ThumbnailGeneratorMWs.addThumbnailInformation,
GalleryMWs.cleanUpGalleryResults, GalleryMWs.cleanUpGalleryResults,
ServerTimingMWs.addServerTiming, ServerTimingMWs.addServerTiming,
RenderingMWs.renderResult RenderingMWs.renderResult
); );
} }
protected static addDirectoryZip(app: Express): void { protected static addDirectoryZip(app: Express): void {
app.get( app.get(
[Config.Server.apiPath + '/gallery/zip/:directory(*)'], [Config.Server.apiPath + '/gallery/zip/:directory(*)'],
// common part // common part
AuthenticationMWs.authenticate, AuthenticationMWs.authenticate,
AuthenticationMWs.normalizePathParam('directory'), AuthenticationMWs.normalizePathParam('directory'),
AuthenticationMWs.authorisePath('directory', true), AuthenticationMWs.authorisePath('directory', true),
// specific part // specific part
ServerTimingMWs.addServerTiming, ServerTimingMWs.addServerTiming,
GalleryMWs.zipDirectory GalleryMWs.zipDirectory
); );
} }
protected static addGetImage(app: Express): void { protected static addGetImage(app: Express): void {
app.get( app.get(
[ [
Config.Server.apiPath + '/gallery/content/:mediaPath(*.(' + Config.Server.apiPath + '/gallery/content/:mediaPath(*.(' +
SupportedFormats.Photos.join('|') + SupportedFormats.Photos.join('|') +
'))', '))',
], ],
// common part // common part
AuthenticationMWs.authenticate, AuthenticationMWs.authenticate,
AuthenticationMWs.normalizePathParam('mediaPath'), AuthenticationMWs.normalizePathParam('mediaPath'),
AuthenticationMWs.authorisePath('mediaPath', false), AuthenticationMWs.authorisePath('mediaPath', false),
// specific part // specific part
GalleryMWs.loadFile, GalleryMWs.loadFile,
ServerTimingMWs.addServerTiming, ServerTimingMWs.addServerTiming,
RenderingMWs.renderFile RenderingMWs.renderFile
); );
} }
protected static addGetVideo(app: Express): void { protected static addGetVideo(app: Express): void {
app.get( app.get(
[ [
Config.Server.apiPath + '/gallery/content/:mediaPath(*.(' + Config.Server.apiPath + '/gallery/content/:mediaPath(*.(' +
SupportedFormats.Videos.join('|') + SupportedFormats.Videos.join('|') +
'))', '))',
], ],
// common part // common part
AuthenticationMWs.authenticate, AuthenticationMWs.authenticate,
AuthenticationMWs.normalizePathParam('mediaPath'), AuthenticationMWs.normalizePathParam('mediaPath'),
AuthenticationMWs.authorisePath('mediaPath', false), AuthenticationMWs.authorisePath('mediaPath', false),
// specific part // specific part
GalleryMWs.loadFile, GalleryMWs.loadFile,
ServerTimingMWs.addServerTiming, ServerTimingMWs.addServerTiming,
RenderingMWs.renderFile RenderingMWs.renderFile
); );
} }
protected static addGetBestFitVideo(app: Express): void { protected static addGetBestFitVideo(app: Express): void {
app.get( app.get(
[ [
Config.Server.apiPath + '/gallery/content/:mediaPath(*.(' + Config.Server.apiPath + '/gallery/content/:mediaPath(*.(' +
SupportedFormats.Videos.join('|') + SupportedFormats.Videos.join('|') +
'))/bestFit', '))/bestFit',
], ],
// common part // common part
AuthenticationMWs.authenticate, AuthenticationMWs.authenticate,
AuthenticationMWs.normalizePathParam('mediaPath'), AuthenticationMWs.normalizePathParam('mediaPath'),
AuthenticationMWs.authorisePath('mediaPath', false), AuthenticationMWs.authorisePath('mediaPath', false),
// specific part // specific part
GalleryMWs.loadFile, GalleryMWs.loadFile,
GalleryMWs.loadBestFitVideo, GalleryMWs.loadBestFitVideo,
ServerTimingMWs.addServerTiming, ServerTimingMWs.addServerTiming,
RenderingMWs.renderFile RenderingMWs.renderFile
); );
} }
protected static addGetMetaFile(app: Express): void { protected static addGetMetaFile(app: Express): void {
app.get( app.get(
[ [
Config.Server.apiPath + '/gallery/content/:mediaPath(*.(' + Config.Server.apiPath + '/gallery/content/:mediaPath(*.(' +
SupportedFormats.MetaFiles.join('|') + SupportedFormats.MetaFiles.join('|') +
'))', '))',
], ],
// common part // common part
AuthenticationMWs.authenticate, AuthenticationMWs.authenticate,
AuthenticationMWs.normalizePathParam('mediaPath'), AuthenticationMWs.normalizePathParam('mediaPath'),
AuthenticationMWs.authorisePath('mediaPath', false), AuthenticationMWs.authorisePath('mediaPath', false),
// specific part // specific part
GalleryMWs.loadFile, GalleryMWs.loadFile,
ServerTimingMWs.addServerTiming, ServerTimingMWs.addServerTiming,
RenderingMWs.renderFile RenderingMWs.renderFile
); );
} }
protected static addGetBestFitMetaFile(app: Express): void { protected static addGetBestFitMetaFile(app: Express): void {
app.get( app.get(
[ [
Config.Server.apiPath + '/gallery/content/:mediaPath(*.(' + Config.Server.apiPath + '/gallery/content/:mediaPath(*.(' +
SupportedFormats.MetaFiles.join('|') + SupportedFormats.MetaFiles.join('|') +
'))/bestFit', '))/bestFit',
], ],
// common part // common part
AuthenticationMWs.authenticate, AuthenticationMWs.authenticate,
AuthenticationMWs.normalizePathParam('mediaPath'), AuthenticationMWs.normalizePathParam('mediaPath'),
AuthenticationMWs.authorisePath('mediaPath', false), AuthenticationMWs.authorisePath('mediaPath', false),
// specific part // specific part
GalleryMWs.loadFile, GalleryMWs.loadFile,
MetaFileMWs.compressGPX, MetaFileMWs.compressGPX,
ServerTimingMWs.addServerTiming, ServerTimingMWs.addServerTiming,
RenderingMWs.renderFile RenderingMWs.renderFile
); );
} }
protected static addRandom(app: Express): void { protected static addRandom(app: Express): void {
app.get( app.get(
[Config.Server.apiPath + '/gallery/random/:searchQueryDTO'], [Config.Server.apiPath + '/gallery/random/:searchQueryDTO'],
// common part // common part
AuthenticationMWs.authenticate, AuthenticationMWs.authenticate,
AuthenticationMWs.authorise(UserRoles.Guest), AuthenticationMWs.authorise(UserRoles.Guest),
VersionMWs.injectGalleryVersion, VersionMWs.injectGalleryVersion,
// specific part // specific part
GalleryMWs.getRandomImage, GalleryMWs.getRandomImage,
GalleryMWs.loadFile, GalleryMWs.loadFile,
ServerTimingMWs.addServerTiming, ServerTimingMWs.addServerTiming,
RenderingMWs.renderFile RenderingMWs.renderFile
); );
} }
/** /**
* Used for serving photo thumbnails and previews * Used for serving photo thumbnails and previews
* @param app * @param app
* @protected * @protected
*/ */
protected static addGetResizedPhoto(app: Express): void { protected static addGetResizedPhoto(app: Express): void {
app.get( app.get(
Config.Server.apiPath + '/gallery/content/:mediaPath(*.(' + Config.Server.apiPath + '/gallery/content/:mediaPath(*.(' +
SupportedFormats.Photos.join('|') + SupportedFormats.Photos.join('|') +
'))/:size', '))/:size',
// common part // common part
AuthenticationMWs.authenticate, AuthenticationMWs.authenticate,
AuthenticationMWs.normalizePathParam('mediaPath'), AuthenticationMWs.normalizePathParam('mediaPath'),
AuthenticationMWs.authorisePath('mediaPath', false), AuthenticationMWs.authorisePath('mediaPath', false),
// specific part // specific part
GalleryMWs.loadFile, GalleryMWs.loadFile,
ThumbnailGeneratorMWs.generateThumbnailFactory(ThumbnailSourceType.Photo), ThumbnailGeneratorMWs.generateThumbnailFactory(ThumbnailSourceType.Photo),
ServerTimingMWs.addServerTiming, ServerTimingMWs.addServerTiming,
RenderingMWs.renderFile RenderingMWs.renderFile
); );
} }
protected static addGetVideoThumbnail(app: Express): void { protected static addGetVideoThumbnail(app: Express): void {
app.get( app.get(
Config.Server.apiPath + '/gallery/content/:mediaPath(*.(' + Config.Server.apiPath + '/gallery/content/:mediaPath(*.(' +
SupportedFormats.Videos.join('|') + SupportedFormats.Videos.join('|') +
'))/:size?', '))/:size?',
// common part // common part
AuthenticationMWs.authenticate, AuthenticationMWs.authenticate,
AuthenticationMWs.normalizePathParam('mediaPath'), AuthenticationMWs.normalizePathParam('mediaPath'),
AuthenticationMWs.authorisePath('mediaPath', false), AuthenticationMWs.authorisePath('mediaPath', false),
// specific part // specific part
GalleryMWs.loadFile, GalleryMWs.loadFile,
ThumbnailGeneratorMWs.generateThumbnailFactory(ThumbnailSourceType.Video), ThumbnailGeneratorMWs.generateThumbnailFactory(ThumbnailSourceType.Video),
ServerTimingMWs.addServerTiming, ServerTimingMWs.addServerTiming,
RenderingMWs.renderFile RenderingMWs.renderFile
); );
} }
protected static addGetVideoIcon(app: Express): void { protected static addGetVideoIcon(app: Express): void {
app.get( app.get(
Config.Server.apiPath + '/gallery/content/:mediaPath(*.(' + Config.Server.apiPath + '/gallery/content/:mediaPath(*.(' +
SupportedFormats.Videos.join('|') + SupportedFormats.Videos.join('|') +
'))/icon', '))/icon',
// common part // common part
AuthenticationMWs.authenticate, AuthenticationMWs.authenticate,
AuthenticationMWs.normalizePathParam('mediaPath'), AuthenticationMWs.normalizePathParam('mediaPath'),
AuthenticationMWs.authorisePath('mediaPath', false), AuthenticationMWs.authorisePath('mediaPath', false),
// specific part // specific part
GalleryMWs.loadFile, GalleryMWs.loadFile,
ThumbnailGeneratorMWs.generateIconFactory(ThumbnailSourceType.Video), ThumbnailGeneratorMWs.generateIconFactory(ThumbnailSourceType.Video),
ServerTimingMWs.addServerTiming, ServerTimingMWs.addServerTiming,
RenderingMWs.renderFile RenderingMWs.renderFile
); );
} }
protected static addGetImageIcon(app: Express): void { protected static addGetImageIcon(app: Express): void {
app.get( app.get(
Config.Server.apiPath + '/gallery/content/:mediaPath(*.(' + Config.Server.apiPath + '/gallery/content/:mediaPath(*.(' +
SupportedFormats.Photos.join('|') + SupportedFormats.Photos.join('|') +
'))/icon', '))/icon',
// common part // common part
AuthenticationMWs.authenticate, AuthenticationMWs.authenticate,
AuthenticationMWs.normalizePathParam('mediaPath'), AuthenticationMWs.normalizePathParam('mediaPath'),
AuthenticationMWs.authorisePath('mediaPath', false), AuthenticationMWs.authorisePath('mediaPath', false),
// specific part // specific part
GalleryMWs.loadFile, GalleryMWs.loadFile,
ThumbnailGeneratorMWs.generateIconFactory(ThumbnailSourceType.Photo), ThumbnailGeneratorMWs.generateIconFactory(ThumbnailSourceType.Photo),
ServerTimingMWs.addServerTiming, ServerTimingMWs.addServerTiming,
RenderingMWs.renderFile RenderingMWs.renderFile
); );
} }
protected static addSearch(app: Express): void { protected static addSearch(app: Express): void {
app.get( app.get(
Config.Server.apiPath + '/search/:searchQueryDTO(*)', Config.Server.apiPath + '/search/:searchQueryDTO(*)',
// common part // common part
AuthenticationMWs.authenticate, AuthenticationMWs.authenticate,
AuthenticationMWs.authorise(UserRoles.Guest), AuthenticationMWs.authorise(UserRoles.Guest),
VersionMWs.injectGalleryVersion, VersionMWs.injectGalleryVersion,
// specific part // specific part
GalleryMWs.search, GalleryMWs.search,
ThumbnailGeneratorMWs.addThumbnailInformation, ThumbnailGeneratorMWs.addThumbnailInformation,
GalleryMWs.cleanUpGalleryResults, GalleryMWs.cleanUpGalleryResults,
ServerTimingMWs.addServerTiming, ServerTimingMWs.addServerTiming,
RenderingMWs.renderResult RenderingMWs.renderResult
); );
} }
protected static addAutoComplete(app: Express): void { protected static addAutoComplete(app: Express): void {
app.get( app.get(
Config.Server.apiPath + '/autocomplete/:text(*)', Config.Server.apiPath + '/autocomplete/:text(*)',
// common part // common part
AuthenticationMWs.authenticate, AuthenticationMWs.authenticate,
AuthenticationMWs.authorise(UserRoles.Guest), AuthenticationMWs.authorise(UserRoles.Guest),
VersionMWs.injectGalleryVersion, VersionMWs.injectGalleryVersion,
// specific part // specific part
GalleryMWs.autocomplete, GalleryMWs.autocomplete,
ServerTimingMWs.addServerTiming, ServerTimingMWs.addServerTiming,
RenderingMWs.renderResult RenderingMWs.renderResult
); );
} }
} }

View File

@ -110,6 +110,20 @@ export class Utils {
return d; return d;
} }
static getUTCFullYear(d: number | Date, offset: string) {
if (!(d instanceof Date)) {
d = new Date(d);
}
return new Date(new Date(d).toISOString().substring(0,19) + (offset ? offset : '')).getUTCFullYear();
}
static getFullYear(d: number | Date, offset: string) {
if (!(d instanceof Date)) {
d = new Date(d);
}
return new Date(new Date(d).toISOString().substring(0,19) + (offset ? offset : '')).getFullYear();
}
static renderDataSize(size: number): string { static renderDataSize(size: number): string {
const postFixes = ['B', 'KB', 'MB', 'GB', 'TB']; const postFixes = ['B', 'KB', 'MB', 'GB', 'TB'];
let index = 0; let index = 0;

View File

@ -24,7 +24,8 @@
{{media.metadata.fileSize | fileSize}} {{media.metadata.fileSize | fileSize}}
</div> </div>
<div class="col-3 align-self-center" [title]="media.metadata.creationDate"> <div class="col-3 align-self-center" [title]="media.metadata.creationDate">
{{media.metadata.creationDate | date}}, {{media.metadata.creationDate | date:'mediumTime'}} {{ media.metadata.creationDate | date : 'longDate' : (media.metadata.creationDateOffset ? media.metadata.creationDateOffset : 'UTC') }},
{{ media.metadata.creationDate | date : (media.metadata.creationDateOffset ? 'HH:mm:ss ZZZZZ' : 'HH:mm:ss') : (media.metadata.creationDateOffset ? media.metadata.creationDateOffset : 'UTC') }}
</div> </div>
</a> </a>
</div> </div>

View File

@ -205,7 +205,7 @@ export class FilterService {
const startMediaDate = new Date(floorDate(minDate)); const startMediaDate = new Date(floorDate(minDate));
prefiltered.media.forEach(m => { prefiltered.media.forEach(m => {
const key = Math.floor((floorDate(m.metadata.creationDate) - startMediaDate.getTime()) / 1000 / usedDiv); const key = Math.floor((floorDate(m.metadata.creationDate) - startMediaDate.getTime()) / 1000 / usedDiv); //TODO
const getDate = (index: number) => { const getDate = (index: number) => {
let d: Date; let d: Date;

View File

@ -496,7 +496,7 @@ export class ControlsLightboxComponent implements OnDestroy, OnInit, OnChanges {
case LightBoxTitleTexts.persons: case LightBoxTitleTexts.persons:
return m.metadata.faces?.map(f => f.name)?.join(', '); return m.metadata.faces?.map(f => f.name)?.join(', ');
case LightBoxTitleTexts.date: case LightBoxTitleTexts.date:
return this.datePipe.transform(m.metadata.creationDate, 'longDate'); return this.datePipe.transform(m.metadata.creationDate, 'longDate', m.metadata.creationDateOffset);
case LightBoxTitleTexts.location: case LightBoxTitleTexts.location:
return ( return (
m.metadata.positionData?.city || m.metadata.positionData?.city ||

View File

@ -54,10 +54,10 @@
</div> </div>
<div class="col-11"> <div class="col-11">
<div class="details-main"> <div class="details-main">
{{ media.metadata.creationDate | date: (isThisYear() ? 'MMMM d' : 'longDate') : 'UTC' }} {{ media.metadata.creationDate | date: (isThisYear() ? 'MMMM d' : 'longDate') : (media.metadata.creationDateOffset ? media.metadata.creationDateOffset : 'UTC') }}
</div> </div>
<div class="details-sub text-secondary row"> <div class="details-sub text-secondary row">
<div class="col-12">{{ media.metadata.creationDate | date : 'EEEE, HH:mm:ss' : 'UTC' }}</div> <div class="col-12">{{ media.metadata.creationDate | date : (media.metadata.creationDateOffset ? 'EEEE, HH:mm:ss ZZZZZ' : 'EEEE, HH:mm:ss') : (media.metadata.creationDateOffset ? media.metadata.creationDateOffset : 'UTC') }}</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -148,7 +148,7 @@ export class InfoPanelLightboxComponent implements OnInit, OnChanges {
isThisYear(): boolean { isThisYear(): boolean {
return ( return (
new Date().getFullYear() === new Date().getFullYear() ===
new Date(this.media.metadata.creationDate).getUTCFullYear() Utils.getUTCFullYear(this.media.metadata.creationDate, this.media.metadata.creationDateOffset)
); );
} }

View File

@ -184,7 +184,7 @@ export class GallerySortingService {
private getGroupByNameFn(grouping: GroupingMethod) { private getGroupByNameFn(grouping: GroupingMethod) {
switch (grouping.method) { switch (grouping.method) {
case SortByTypes.Date: case SortByTypes.Date:
return (m: MediaDTO) => this.datePipe.transform(m.metadata.creationDate, 'longDate', 'UTC'); return (m: MediaDTO) => this.datePipe.transform(m.metadata.creationDate, 'longDate', m.metadata.creationDateOffset);
case SortByTypes.Name: case SortByTypes.Name:
return (m: MediaDTO) => m.name.at(0).toUpperCase(); return (m: MediaDTO) => m.name.at(0).toUpperCase();