HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


[solved]time settings

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#75322 (In Topic #15612)
Avatar

Community saint

I need to make some changes to the time settings, but can 't find it.  And How to get the 24 hours clock  Oke I was 4 days in hospital for a hip operation, but this can not have any effect on my brain or eyes :)  I hope. But can someone give me some direction in this please?


Greets Harry


Last edit: by Harry-S


http://digiflash.nl Photo community  (dutch)
Back to the top
 
Posted
Rating:
#75417
Avatar

Community saint

No one on this?


http://digiflash.nl Photo community  (dutch)
Back to the top
 
Posted
Rating:
#75419
Avatar

Community saint

Still looking, Harry, but no success as yet!

bummer

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#75425
Avatar

Community saint

Thanks Fletch!


http://digiflash.nl Photo community  (dutch)
Back to the top
 
Posted
Rating:
#75426
Avatar



Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#75428
Avatar

Community saint

Chris,

I see there: adjusting the site time-zone relative to server time (this is a site configuration option).

Under site configuration I can set only +00.1 Amsterdam-brussel…………

Not php code to ajust the local time settings. I mean this my output is in am/pm time setting, not 24 hours set.


http://digiflash.nl Photo community  (dutch)
Back to the top
 
Posted
Rating:
#75432
Avatar

Look under "Special strings". The time settings are controlled via language strings.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#75434
Avatar

Community saint

Thanks Chris.

I will look to them.


http://digiflash.nl Photo community  (dutch)
Back to the top
 
Posted
Rating:
#75444
Avatar

Community saint

Harry, go to Admin Zone » Style » Translate/re-phrase the software and select the 'global' language file. Then change the following from:

Code

time_hour=g a
time_hour_and_mins=g:i a
timezone_time=g:i a, l

to:

Code

time_hour=G
time_hour_and_mins=G:i
timezone_time=G:i, l

Chris, you might want to make an explicit reference to global in the special strings section as it is not particularly clear that thats where the special strings are located.

While there are a few references to global they are more passing references and not in the sections one would expect to have to read to make language changes through the UI.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#75447
Avatar

Community saint

Thanks for this, temp. I have been wondering how to change the date notation.

@Chris-
On the provided linked page for localization, link #2 in the "date_* / time_* / calendar_*" section appears to be dead.

Bob
Back to the top
 
Posted
Rating:
#75448
Avatar

Community saint

Temp-

I have two questions.

In my global.ini, I have:

Code

g:i a, l

Do you replace the I with either '1" or '0' to control whether the time is reported in DST?

Secondaly, and more important for me, I was to change date notation from DD/MM/YYYY to MM/DD/YYYY.

I'm guessing that the information I need might be in the missing file I noted above. In my global.ini, I have:

Code

date_regular_date %d %B %Y

I'm guessing that the "%B" notation is equivalent to MM. Is that true? Would I achieve what I want for date notation (MM/DD/YYYY) by changing the entry to '%B %d %Y'?

Thanks for any help.

Bob
Back to the top
 
Posted
Rating:
#75450
Avatar

Community saint

The 1 or 0 is a return value when it is being used as a test for DST, so you can't use 1 or 0.

Not sure what exactly you are after with DST, but you can play around in OcCLE using the following code to try out different things quickly:

Code

:echo date("g:i a, l",mktime(18,21,05,9,23,2011));:

For date format see PHP: strftime - Manual .

%B is the full month name. For MM/DD/YYYY you want %m/%d/%Y.

In OcCLE using the following for testing:

Code

:echo strftime("%m/%d/%Y", strtotime("6:21:05 pm 23 Sep 2011"));:

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#75452
Avatar

Community saint

Thanks for that, temp.

I ended up going with '%B %d %Y' - much better for my mostly American audience.

Thanks for your help.

Bob
Back to the top
 
Posted
Rating:
#75455
Avatar

Community saint

Thanks Temp, but after change the code and empthy all caches, and browser nothing changed all time is staying to am/pm notation. 


http://digiflash.nl Photo community  (dutch)
Back to the top
 
Posted
Rating:
#75456
Avatar

Community saint

oke in the events-calendar the time is changed. But not in the front news, and forum posts. 


http://digiflash.nl Photo community  (dutch)
Back to the top
 
Posted
Rating:
#75457
Avatar

Community saint

I have made a calendar evtry for today, this is the output in the block on the front page.



http://digiflash.nl Photo community  (dutch)
Back to the top
 
Posted
Rating:
#75460
Avatar

There are various strings for various different date/time formats ocPortal uses.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#75466
Avatar

Community saint

hmm, this means I have to search all css files for a time setting?


http://digiflash.nl Photo community  (dutch)
Back to the top
 
Posted
Rating:
#75467
Avatar

Lots of strings, all in 'global'…

date_withinday=%i:%M %p
date_withinweek_date=%a
date_withinweek_joiner=
date_withinweek_time=%M%p
date_regular_date=%d %B %Y
date_regular_joiner=,
date_regular_time=%i:%M %p
date_verbose_date=%a %d %B %Y
date_verbose_joiner=,
date_verbose_time=%i:%M %p
time_hour=g a
time_hour_and_mins=g:i a
timezone_time=g:i a, l


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#75468
Avatar

Community saint

Harry-

I noticed that there were several different setting for date and time in global.ini. I know I changed a few figuring that they are used in different parts of ocPortal.

Bob

EDIT: Chris beat me to it and with better info.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Expand