Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
49e0753e
Commit
49e0753e
authored
Apr 04, 2013
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show GMT time, 24-hour.
parent
9075e844
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
cms/templates/edit_subsection.html
+1
-1
cms/templates/overview.html
+1
-1
common/lib/xmodule/xmodule/tests/test_date_utils.py
+1
-1
common/lib/xmodule/xmodule/util/date_utils.py
+2
-2
No files found.
cms/templates/edit_subsection.html
View file @
49e0753e
...
...
@@ -43,7 +43,7 @@
<p
class=
"notice"
>
The date above differs from the release date of ${parent_item.display_name_with_default}, which is unset.
% else:
<p
class=
"notice"
>
The date above differs from the release date of ${parent_item.display_name_with_default} –
${get_time_struct_display(parent_item.lms.start, '%m/%d/%Y at %
I:%M %p
')}.
${get_time_struct_display(parent_item.lms.start, '%m/%d/%Y at %
H:%M UTC
')}.
% endif
<a
href=
"#"
class=
"sync-date no-spinner"
>
Sync to ${parent_item.display_name_with_default}.
</a></p>
% endif
...
...
cms/templates/overview.html
View file @
49e0753e
...
...
@@ -162,7 +162,7 @@
<div
class=
"section-published-date"
>
<
%
start_date_str =
get_time_struct_display(section.lms.start,
'%
m
/%
d
/%
Y
')
start_time_str =
get_time_struct_display(section.lms.start,
'%
I:
%
M
%
p
')
start_time_str =
get_time_struct_display(section.lms.start,
'%
H:
%
M
UTC
')
%
>
%if section.lms.start is None:
<span
class=
"published-status"
>
This section has not been released.
</span>
...
...
common/lib/xmodule/xmodule/tests/test_date_utils.py
View file @
49e0753e
...
...
@@ -15,7 +15,7 @@ def test_get_time_struct_display():
def
test_get_default_time_display
():
assert_equals
(
""
,
date_utils
.
get_default_time_display
(
None
))
test_time
=
time
.
struct_time
((
1992
,
3
,
12
,
15
,
3
,
30
,
1
,
71
,
0
))
assert_equals
(
"Mar 12, 1992 at
03:03 PM
"
,
assert_equals
(
"Mar 12, 1992 at
15:03 UTC
"
,
date_utils
.
get_default_time_display
(
test_time
))
...
...
common/lib/xmodule/xmodule/util/date_utils.py
View file @
49e0753e
...
...
@@ -6,11 +6,11 @@ def get_default_time_display(time_struct):
"""
Converts a time struct to a string representation. This is the default
representation used in Studio and LMS.
It is of the form "Apr 09, 2013 at
04:00 PM
".
It is of the form "Apr 09, 2013 at
16:00 UTC
".
If None is passed in, an empty string will be returned.
"""
return
get_time_struct_display
(
time_struct
,
"
%
b
%
d,
%
Y at
%
I:
%
M
%
p
"
)
return
get_time_struct_display
(
time_struct
,
"
%
b
%
d,
%
Y at
%
H:
%
M UTC
"
)
def
get_time_struct_display
(
time_struct
,
format
):
...
...
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