Bug 394504

Summary: Calculate %Y, %M, %D, %H, %m, %S at the time of capturing screenshot
Product: [Applications] Spectacle Reporter: Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA>
Component: GeneralAssignee: Boudhayan Gupta <me>
Status: RESOLVED FIXED    
Severity: normal CC: knutecht, null
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 18.12.0

Description Arfrever Frehtes Taifersar Arahesis 2018-05-21 05:17:55 UTC
Pattern of saved filename can be configured in Spectacle configuration in "Save" tab as e.g. "Screenshot_%Y%M%D_%H%m%S".

Currently %Y, %M, %D, %H, %m, %S are calculated at the time of pressing "Save As" button and opening "Save File" window or at the time of pressing "Save" button.

The reasonable behavior would be to calculate %Y, %M, %D, %H, %m, %S at the time of capturing screenshot.
Comment 1 null 2018-05-21 06:46:56 UTC
Makes sense, an can easily be confirmed by taking a fullscreen screenshot with displaying of seconds enabled for the clock widget.
Comment 2 null 2018-05-21 06:49:13 UTC
BTW, let us know in case you are interested in submitting a patch for this (which is the fastest way to get the issue fixed), we are happy to help you getting started.
Comment 3 utecht 2018-08-27 17:53:21 UTC
I created diff D15106 to fix this bug.
Comment 4 Nate Graham 2018-09-11 12:49:20 UTC
Git commit 006bbaa0f63c764b04451f938afe39f7afa0cc18 by Nathaniel Graham, on behalf of Kyle Utecht.
Committed on 11/09/2018 at 12:42.
Pushed by ngraham into branch 'master'.

Calculate date and time values for file name at time of screen shot rather than time of save

Summary:
Added property to ExportManager to hold timestamp of screenshot that is then used when creating the file name instead of the file's save timestamp.
FIXED-IN: 18.12.0

Reviewers: #spectacle, ngraham

Reviewed By: #spectacle, ngraham

Subscribers: ngraham

Differential Revision: https://phabricator.kde.org/D15106

M  +6    -1    src/ExportManager.cpp
M  +3    -0    src/ExportManager.h
M  +1    -0    src/SpectacleCore.cpp

https://commits.kde.org/spectacle/006bbaa0f63c764b04451f938afe39f7afa0cc18