[vlc-commits] [Git][videolan/vlc][master] macosx/library: show year date correctly
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Sun Aug 17 13:00:13 UTC 2025
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
87b4b49e by Felix Paul Kühne at 2025-08-17T12:46:51+00:00
macosx/library: show year date correctly
Instead of the unix time stamp, show the correct date, fixes #29247
- - - - -
1 changed file:
- modules/gui/macosx/library/VLCLibraryCollectionViewMediaItemSupplementaryDetailView.m
Changes:
=====================================
modules/gui/macosx/library/VLCLibraryCollectionViewMediaItemSupplementaryDetailView.m
=====================================
@@ -71,7 +71,9 @@ NSCollectionViewSupplementaryElementKind const VLCLibraryCollectionViewMediaItem
NSMutableArray<NSString *> * const strings = NSMutableArray.array;
if (actualItem.year > 0) {
- [strings addObject:[NSString stringWithFormat:@"%u", actualItem.year]];
+ NSDate *yearDate = [NSDate dateWithTimeIntervalSince1970:actualItem.year];
+ NSCalendar *calendar = [NSCalendar currentCalendar];
+ [strings addObject:[NSString stringWithFormat:@"%ld", [calendar component:NSCalendarUnitYear fromDate:yearDate]]];
} else if (actualItem.files.count > 0) {
VLCMediaLibraryFile * const firstFile = actualItem.files.firstObject;
const time_t fileLastModTime = firstFile.lastModificationDate;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/87b4b49ea3c6ffaa2029669ca4debd4a35981a08
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/87b4b49ea3c6ffaa2029669ca4debd4a35981a08
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list