Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to submit patches for elogv?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
pepoluan
n00b
n00b


Joined: 28 Feb 2011
Posts: 43
Location: Jakarta, Indonesia

PostPosted: Thu Nov 07, 2024 10:12 am    Post subject: How to submit patches for elogv? Reply with quote

I want to submit a patch for elogv that will add the option of specifying a different date format (currently it seems hard-coded to be "MM/DD/YY", and as a sane person I'd like it to be "YYYY-MM-DD" instead).

However, the elogv repo on GitHub ( https://github.com/gentoo/elogv ) seems to be just a mirror.

So, how do I submit a proposed patch to elogv?
_________________
Nobody is Perfect.
I am Nobody.
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9606
Location: beyond the rim

PostPosted: Thu Nov 07, 2024 10:45 am    Post subject: Re: How to submit patches for elogv? Reply with quote

pepoluan wrote:
I want to submit a patch for elogv that will add the option of specifying a different date format (currently it seems hard-coded to be "MM/DD/YY", and as a sane person I'd like it to be "YYYY-MM-DD" instead).

However, the elogv repo on GitHub ( https://github.com/gentoo/elogv ) seems to be just a mirror.

So, how do I submit a proposed patch to elogv?


In doubt submit the patch to bugs.gentoo.org.
Back to top
View user's profile Send private message
nicop
Tux's lil' helper
Tux's lil' helper


Joined: 10 Apr 2014
Posts: 87

PostPosted: Thu Nov 07, 2024 10:59 am    Post subject: Reply with quote

Pull Request could be made :
https://github.com/gentoo/elogv/pulls
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1904

PostPosted: Thu Nov 07, 2024 1:49 pm    Post subject: Reply with quote

pepoluan wrote:
I want to submit a patch for elogv that will add the option of specifying a different date format (currently it seems hard-coded to be "MM/DD/YY", and as a sane person I'd like it to be "YYYY-MM-DD" instead).

It is actually using Python's %x modifier for locale specific date formatting with strftime. https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes

This would have to be changed to isoformat (or another formatting string) to get the desired result.

Alternatively, there's a cheap workaround for ISO 8601 if you add en_DK.UTF-8 to /etc/locale.gen then run locale-gen:
Code:
LC_TIME=en_DK.UTF-8 elogv
This trick only works with %x strftime calls as other month names may not be what is expected.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2395

PostPosted: Thu Nov 07, 2024 2:37 pm    Post subject: Re: How to submit patches for elogv? Reply with quote

pepoluan wrote:
as a sane person I'd like it to be "YYYY-MM-DD"


Don't mistake preference for sanity, because if it were, then for me you would be insane for not wanting it to be "DD/MM/YY".

Best Regards,
Georgi
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5084
Location: Bavaria

PostPosted: Thu Nov 07, 2024 2:47 pm    Post subject: Reply with quote

If you want to sort by date, YYYY-MM-DD is simply unbeatable ;-)
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum