Skip to content
This repository has been archived by the owner on May 16, 2020. It is now read-only.

Fixed timezone issue #275

Closed
wants to merge 1 commit into from
Closed

Fixed timezone issue #275

wants to merge 1 commit into from

Conversation

kracekumar
Copy link
Contributor

Disadvantage

  • Piece of form logic is redefined in views.
  • Start Time and End Time will appear at the end.

Fixes #189 .

form = EventForm(parent=profile, model=Event)
form.start_datetime.timezone = app.config['tz']
form.end_datetime.timezone = app.config['tz']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tried app.config['TIMEZONE'] instead of app.config['tz'] to see if that fixes it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried it but didn't work. When code enters process_formdata(self, valuelist):, timezone value is set back to UTC.

Also added set_timezone in baseframe in DateTimeField. Didn't work.

def set_timezone(self, timezone):
        self.timezone =  timezone
        self.tz = pytz_timezone(timezone)

Whatever I tried to do was with object level and didn't work.

@jace
Copy link
Member

jace commented Dec 19, 2013

I've fixed it cleanly between Baseframe and Hacknight, so this patch is no longer required.

@jace jace closed this Dec 19, 2013
@jace jace deleted the issue-189 branch December 19, 2013 06:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Time Field Error
2 participants