Register   Login
     
  Latest Posts  
Module Development Techniques
by hchattaway on 11/23/2008 5:14 PM
Customizing the URL a little further
by tmahmud on 11/23/2008 4:11 PM
RE: Google Maps
by smcculloch on 11/23/2008 10:29 AM
RE: I cant get rss feeds to work correctly
by smcculloch on 11/23/2008 10:27 AM
captcha still proken
by StatisticsIO on 11/23/2008 6:11 AM
RE: Comments RSS feeds
by StatisticsIO on 11/23/2008 6:09 AM
Regions and Copuntry List scripts for Location Types
by rodneyjoyce on 11/23/2008 4:56 AM
RE: BUG: Sort by: Price
by usheen on 11/23/2008 1:23 AM
RE: News Articles 301 Redirect
by mcox on 11/22/2008 11:16 PM
RE: I cant get rss feeds to work correctly
by davidthomson on 11/22/2008 11:14 PM
  Forums  
Subject: Publish time - use user/portal timezone
Prev Next
You are not authorized to post a reply.

Author Messages
caroigUser is Offline
Gold Membership
Nuke Master
Nuke Master
Posts:278

11/07/2005 4:37 AM  

Excellent enhancements to the News Article module, the new interface is a real boon. 

Now that there is the addition of a published time - is it not possible to use the users or if anon., portal timezone to display all times in News Articles 'correctly'.

Scott McCullochUser is Offline
Administrators
Nuke Master
Nuke Master
Posts:12450


11/07/2005 4:51 AM  
There is a bug in the current release for the publish time, what the user sees is in the user time, but editing the article causes a time difference problem. I've just coded a fix locally that i will release tomorrow.

Scott McCulloch
Site Administrator
Scott McCullochUser is Offline
Administrators
Nuke Master
Nuke Master
Posts:12450


11/07/2005 4:53 AM  
One other thing, currently when looking at publish date it picks up from a UTC time, are you saying we should maybe use user time so it appears at 4pm friday for example, no matter where in the world you are?

Scott McCulloch
Site Administrator
caroigUser is Offline
Gold Membership
Nuke Master
Nuke Master
Posts:278

11/07/2005 5:28 AM  

No - I'd like to see the date/time as UTC + the timezone offset for my timezone, so you'd see this post with a time of 13:30 + 9.5 hours (?) and I'd see it as 13:30 + 1hr.  If the user is anonymous, then whatever timezone offset is the default for the portal.

Would this also modify the date/times used in the template tokens - created date/time and  publish start & end dates? 

Scott McCullochUser is Offline
Administrators
Nuke Master
Nuke Master
Posts:12450


11/07/2005 1:09 PM  
It should already do this for registered users? (Adjust the time to that user's region)

Scott McCulloch
Site Administrator
caroigUser is Offline
Gold Membership
Nuke Master
Nuke Master
Posts:278

11/08/2005 12:37 AM  
Hmm.  That's not what I see on my test system.  I have my portal, admin and test user all at UTC+1, when I create an article the publish time/date defaults to the server time (UTC -7) ditto viewing the article with admin or user account.  Comments date/time also use server time. 
Scott McCullochUser is Offline
Administrators
Nuke Master
Nuke Master
Posts:12450


11/08/2005 2:50 AM  
Posted By caroig on 11/08/2005 12:37 AM
Hmm.  That's not what I see on my test system.  I have my portal, admin and test user all at UTC+1, when I create an article the publish time/date defaults to the server time (UTC -7) ditto viewing the article with admin or user account.  Comments date/time also use server time. 


Hmm, I'm a little confused by the datetime situation at the moment, here is how the code works currently:-

The client user time is calculated based on the offset from the portal time. Your portal time should really be where your server is actually located (the timezone of that server).

I got the code from this post in the forums.

What times do you get displayed for other modules, e.g. active forums if you use it?

What I am wondering now is should I just be storing the UTC time, then doing the conversion, which would make the above post wrong and I would need to do something with the current data stored.


Scott McCulloch
Site Administrator
Scott McCullochUser is Offline
Administrators
Nuke Master
Nuke Master
Posts:12450


11/08/2005 2:56 AM  
I've sent an email to Will from activemodules to see how he does it as well..

Scott McCulloch
Site Administrator
caroigUser is Offline
Gold Membership
Nuke Master
Nuke Master
Posts:278

11/08/2005 4:00 AM  

My apologies I hadn't thought this through at all !!

My portal time was set to my local time zone.  I have now reset it to the server time zone and the times display OK for registered users. 
I did have a few problems on the article save but I see that will be resolved in the next release.

The question for anonymous users is still there but that seems to be a general DNN concern looking at the thread you mentioned.  I would suggest that a host timezone setting which related to the server time zone would be most appropriate, each portal could then apply an offset to express it's operating timezone and the default for the unregistered users and for user registration.

You are not authorized to post a reply.
Forums > Modules > News Articles > Publish time - use user/portal timezone



ActiveForums 3.7