Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
Nuovo sito
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
16
Issues
16
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Web
Nuovo sito
Commits
da85d408
Commit
da85d408
authored
Nov 30, 2023
by
shadMod
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added try with check if 'it' is in locale setting
parent
13123a55
Pipeline
#352
passed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
uitwww/src/news/news.py
uitwww/src/news/news.py
+8
-2
No files found.
uitwww/src/news/news.py
View file @
da85d408
...
@@ -114,8 +114,14 @@ class News:
...
@@ -114,8 +114,14 @@ class News:
nr_file
=
str
(
filename
.
replace
(
".md"
,
""
)).
zfill
(
3
)
nr_file
=
str
(
filename
.
replace
(
".md"
,
""
)).
zfill
(
3
)
# get last edit of file
# get last edit of file
last_edit
=
os
.
stat
(
path
).
st_mtime
last_edit
=
os
.
stat
(
path
).
st_mtime
# set with it language
locale
.
setlocale
(
locale
.
LC_TIME
,
"it_IT"
)
try
:
# check and set with it_IT language
if
'it_it'
in
locale
.
locale_alias
:
locale
.
setlocale
(
locale
.
LC_TIME
,
"it_IT.ISO8859-1"
)
except
:
pass
# format datetime: 01 Novembre 2023 - 00:00
# format datetime: 01 Novembre 2023 - 00:00
date_edit
=
datetime
.
fromtimestamp
(
last_edit
)
date_edit
=
datetime
.
fromtimestamp
(
last_edit
)
data
[
"last_edit"
]
=
date_edit
.
strftime
(
"%d %B %Y - %H:%M"
)
data
[
"last_edit"
]
=
date_edit
.
strftime
(
"%d %B %Y - %H:%M"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment