FAQ
| This is a
LIVE
service |
Changelog
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-cambridge-profile
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Information Services
DevOps
Drupal team
drupal-cambridge-profile
Commits
6f1d9d71
Commit
6f1d9d71
authored
10 years ago
by
thewilkybarkid
Browse files
Options
Downloads
Patches
Plain Diff
Set date formats to UK style
parent
60a53ecc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!16
Set date formats to UK style
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/cambridge/cambridge.install
+9
-0
9 additions, 0 deletions
src/cambridge/cambridge.install
src/cambridge_base.inc
+32
-0
32 additions, 0 deletions
src/cambridge_base.inc
src/cambridge_lite/cambridge_lite.install
+9
-0
9 additions, 0 deletions
src/cambridge_lite/cambridge_lite.install
with
50 additions
and
0 deletions
src/cambridge/cambridge.install
+
9
−
0
View file @
6f1d9d71
...
...
@@ -472,3 +472,12 @@ function cambridge_update_7106() {
}
filter_formats_reset
();
}
/**
* Set date formats to UK style.
*/
function
cambridge_update_7107
()
{
require_once
'cambridge_base.inc'
;
cambridge_base_set_up_date_formats
();
}
This diff is collapsed.
Click to expand it.
src/cambridge_base.inc
+
32
−
0
View file @
6f1d9d71
...
...
@@ -572,6 +572,9 @@ function cambridge_base_install() {
// Set some sensible defaults for the Views module.
variable_set
(
'views_ui_show_advanced_help_warning'
,
0
);
// Set date formats to UK style.
cambridge_base_set_up_date_formats
();
}
/**
...
...
@@ -646,3 +649,32 @@ function cambridge_base_set_up_focus_on_teasers() {
field_update_instance
(
$instance
);
}
}
/**
* Set date formats to UK style.
*/
function
cambridge_base_set_up_date_formats
()
{
if
(
TRUE
===
module_exists
(
'locale'
))
{
// Something has been done with locales, so abort.
return
;
}
if
(
'Europe/London'
!==
variable_get
(
'date_default_timezone'
,
'Europe/London'
))
{
return
;
}
if
(
'l, F j, Y - H:i'
!==
variable_get
(
'date_format_long'
,
'l, F j, Y - H:i'
)
||
'D, m/d/Y - H:i'
!==
variable_get
(
'date_format_medium'
,
'D, m/d/Y - H:i'
)
||
'm/d/Y - H:i'
!==
variable_get
(
'date_format_short'
,
'm/d/Y - H:i'
)
)
{
// One of the Drupal defaults has changed, so abort.
return
;
}
variable_set
(
'date_format_long'
,
'l, j F, Y - H:i'
);
variable_set
(
'date_format_medium'
,
'D, d/m/Y - H:i'
);
variable_set
(
'date_format_short'
,
'd/m/Y - H:i'
);
}
This diff is collapsed.
Click to expand it.
src/cambridge_lite/cambridge_lite.install
+
9
−
0
View file @
6f1d9d71
...
...
@@ -26,3 +26,12 @@ function cambridge_lite_update_7100() {
cambridge_base_set_up_focus_on_teasers
();
}
/**
* Set date formats to UK style.
*/
function
cambridge_lite_update_7101
()
{
require_once
'cambridge_base.inc'
;
cambridge_base_set_up_date_formats
();
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment