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.


default guest Time Zone

Login / Search

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

Fan in action

set up a default guest Time Zone

Is there a way to set up a default 'guest' time zone? I would like un-logged-in guests that are using Internet Explorer to see calendar events in the local time zone. The calendar event times work in Firefox when coming on to the site as a guest, but IE appears to convert times back to GMT. If a user is logged in and the 'current time' is set correctly, IE shows the correct times.

Or, is there a setting in IE that sets the correct local time zone?

Thanks,
Andy.
Back to the top
 
Posted
Rating:
#65864
Avatar

Hopefully the attached file will fix the problem.

ocPortal detects timezones for guests. However browsers report the time in inconsistent ways, and some IE's seem to do it differently to other IE's (I just tested on my laptop and it failed, which is why I was able to find a fix easily).

Attachment
sources/temporal.php
» Download: temporal.php (10 Kb, 148 downloads so far)


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:
#65877
Avatar

Fan in action

That didn't fix it. Here's some more info that may help. IE 8 (32 and 64 bit) appears to show GMT instead of local time in the calendar event times when logged in as a guest. Firefox works correctly. Site hosts are my local test rig (vista running xampp) and godaddy linux. Both sites have same problem.

I FTPed the file you provided to /sources_custom and changed the permissions to 0644. Just to make sure, I also stashed the original temporal.php and copied the provided file to /sources on my test rig. Still no joy.

Is there anything else I can provide to help solve this issue?
Back to the top
 
Posted
Rating:
#65887
Avatar

If you could use IE's developer tools to tell us what IE says your current time is.



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:
#65907
Avatar

Fan in action

My IE8 doesn't have a [Console] tab, or the [Network] tab for that matter.  It does have the other ones shown in your attachment. Is there a setting to turn these on, or another way to find out what time it thinks it is?

Thanks,
Andy.
Back to the top
 
Posted
Rating:
#65909
Avatar

Whoops that was from IE9, my mistake. There should be a console in the developer tools under the Script tab that is similar.


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:
#65910
Avatar

Fan in action

I entered: new Date().toString()

and got back:
"Sat Jan 22 13:26:56 MST 2011"

which is my correct time and time zone (MST).

I also noticed that the Posted and Last Post times are consistently incorrect when in IE8 as 'guest', in addition to the Calendar event times.

I'll double check that the fixed file you provided is in place.
Back to the top
 
Posted
Rating:
#65911
Avatar

Fan in action

The temporal.php I put in the sources_custom folder is 10,109 bytes and timestamped: 1/19/2011 7:36:27am.

The temporal.php currently locate in the sources folder is 10,103 bytes and timestamped:
12/29/2010 8:21:44am.

I did a de-cache by checking all the boxes in the De-cachers section and (Proceed).
Back to the top
 
Posted
Rating:
#65912
Avatar

Attachment
» Download: temporal.php (10 Kb, 145 downloads so far)


Does this fix it?


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:
#65913
Avatar

Fan in action

The time for guest access is correct, but now when I try to gain access to the admin zone from the side menu with:
[ Personal Zone ]
[ My Profile ]
[ Admin Zone ]
[ Be invisible ]
[ Logout ]
menu options I get the following error:

Fatal error: Call to undefined function integer_format() in /home/content/40/7320140/html/sources_custom/temporal.php on line 43
An error has occurred

PHP ERROR [1] Call to undefined function integer_format() in /home/content/40/7320140/html/sources_custom/temporal.php on line 43 (version: 5.0.3, PHP version: 5.2.14, URL: /adminzone/index.php?page=start)
Here is the stack trace:

Below is a stack trace revealing the state the software was in when the error occurred. If this represents a bug in the unmodified software, you may want to check ABS Websites website for a fix, and if there isn't one, report this as a bug. Please note that merely posting a stack trace is not sufficient for us to solve your problem; the stack trace is just an aid that presents us with additional information. We still need to know the error message, what you tried to do, how you tried to do it, version numbers, and any other appropriate information.
We apologise for this problem and if it's a bug we hope you will work with us so that we can fix it for you promptly.
File    '/home/content/40/7320140/html/sources/failure.
php'
Line    '604'
Function    'get_html_trace'
Args    

File    '/home/content/40/7320140/html/sources/global2.
php'
Line    '920'
Function    '_fatal_exit'
Args    

'PHP ERROR [1] Call to undefined function integer_format() in /home/content/40/7320140/html/sources_custom/temporal.php on line 43'

File    '/home/content/40/7320140/html/sources/failure.
php'
Line    '161'
Function    'fatal_exit'
Args    

'PHP ERROR [1] Call to undefined function integer_format() in /home/content/40/7320140/html/sources_custom/temporal.php on line 43'

File    '/home/content/40/7320140/html/sources/global2.
php'
Line    '779'
Function    '_ocportal_error_handler'
Args    

'error'

1

'Call to undefined function integer_format()'

'/home/content/40/7320140/html/sources_custom/temporal.php'

43

File    '/home/content/40/7320140/html/sources/global2.
php'
Line    '719'
Function    'ocportal_error_handler'
Args    

1

'Call to undefined function integer_format()'

'/home/content/40/7320140/html/sources_custom/temporal.php'

43

Function    'catch_fatal_errors'
Args


Back to the top
 
Posted
Rating:
#65914
Avatar

Whoops. I gave you a 5.1 beta 2 version of the file and didn't realise it wasn't compatible.
You need to transplant this line:

Code


         $client_time=preg_replace('# ([A-Z]{3})([\+\-]\d+)?( \([\w\s]+\))?( \d{4})?$#','${4}',$client_time);
into the original 5.0.3 version. Put it over the similar line that has 'preg_replace' in it.


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:
#65916
Avatar

Fan in action

I found the line in the previously-supplied temporal.php with 'preg_replace' in it, but it looks identical to the one you want me to replace it with.  I'm not a PHP programmer, so I may have missed something, and will fix the file and re-load it to the site.

Thanks,
Andy.
Back to the top
 
Posted
Rating:
#65917
Avatar

Fan in action

That didn't fix the latest issue when going into Admin Zone's start page.
Back to the top
 
Posted
Rating:
#65919
Avatar

Attachment
» Download: temporal.php (10 Kb, 156 downloads so far)


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:
#65928
Avatar

Fan in action

That did it!  I've got some more testing to call it all good, but the guest user shows correct 'local' time and I can get back into the admin zone's start page.

Thanks a lot!

Andy.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: