Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing leading zero in [hour], [minute] and [second] #4019

Closed
foreachthing opened this issue Jun 8, 2017 · 8 comments
Closed

Missing leading zero in [hour], [minute] and [second] #4019

foreachthing opened this issue Jun 8, 2017 · 8 comments
Assignees
Milestone

Comments

@foreachthing
Copy link
Member

Version

slic3r-gui3-shortcuts.2017.05.26.1123.a1b0246.64bit

Operating system type + version

Windows 7 Pro

Behavior

  • instead of [timestamp] (where it works), I use [hour]. If [hour] < 10, then there is no leading zero. Same for minutes and seconds. This could lead to this time: 913 instead of 090103.
@lordofhyphens lordofhyphens added this to the 1.3.2 milestone Jun 8, 2017
@lordofhyphens
Copy link
Member

lordofhyphens commented Jun 9, 2017

[timestamp] has the special processing that you are looking for, the entire point of the separated ones is to give you the exact number without any special processing.

See:
https://github.com/alexrj/Slic3r/blob/master/xs/src/libslic3r/PlaceholderParser.cpp, function process(). [timestamp] should be valid anywhere [hour], etc are supported.

One of the points I am trying to get at is that you would prefer that hour/minute/second gives formatted output. The next person prefers it being the raw values and suddenly we're back where we started.

(unrelated: you should probably stop using gui3-shortcuts, it isn't being maintained as it was merged).

@foreachthing
Copy link
Member Author

stop using gui3-shortcuts

Thanks. I'll try :-)
Then I'll fudge something together with my post processing... I can add anything to my new file name right there. Sorry to bother you with this. - closed -

@lordofhyphens
Copy link
Member

It would help if you explained the use case better--why you wanted the output to be that way.

It isn't hard at all to have separate date and time entries (you can see what goes into the time stamp right there), but I would like to put some thought into the interface as well.

@foreachthing
Copy link
Member Author

The Ultimaker 2 has a limited filename length display capability. So, I wanted to make sure I print the latest file (without cleaning the SD-card all the time). I think that 090103 makes a more human readable time than 913.

@alranel
Copy link
Member

alranel commented Jun 9, 2017

Zero-padding the individual date/time variables makes sense and I can't see what could go wrong with doing it. @lordofhyphens what do you think?

@lordofhyphens
Copy link
Member

lordofhyphens commented Jun 9, 2017 via email

@lordofhyphens lordofhyphens modified the milestones: 1.3.0, 1.3.2 Jun 9, 2017
@lordofhyphens
Copy link
Member

@foreachthing There you go.
@alexrj Refactored things a bit as well to re-use the variables that got set in the timestamp generation.

@lordofhyphens lordofhyphens self-assigned this Jun 9, 2017
@foreachthing
Copy link
Member Author

Thanks a lot! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants