Drupal4Gov / Drupal-GovCon-2015

Drupal GovCon 2015 website
MIT License
1 stars 2 forks source link

Unable to set Times #106

Closed bendygirl closed 9 years ago

bendygirl commented 9 years ago

Unable to plot sessions due to a bug with times. Times are rendered 4 hours earlier than EST. Times do not show up in Content Type.

Field Collection https://www.drupalgovcon.org/admin/structure/field-collections/field-event-timeslots/fields

Time slot view https://www.drupalgovcon.org/admin/structure/views/view/cod_bof_schedule_timeslots/edit

The entity reference points to a view that does not appear to exist. cod_schedule_timeslot_widget - entity reference

@jdearie @timwood @Nneka

bendygirl commented 9 years ago

@Nneka I'm on line so if you need help or want to do a join.me, let me know, I'm available, when not cleaning.

Nneka commented 9 years ago

Was unable to reproduce this issue on my local development environment. Thought it would be server time, but it seems that the server time is correct. I don't have ssh access, but I used the datetime page (https://www.drupalgovcon.org/admin/config/regional/date-time/formats/add) and typed in 'M d Y g:i a T' into the date format, and it generated the correct date. Still investigating.

bendygirl commented 9 years ago

@Nneka I could add a few times. Not sure that would be helpful, but if you can fix the time issue, then you should be able to see pretty clearly when the added times revert to the actual time.

Nneka commented 9 years ago

@bendygirl Ok. Found the module that generates that "Add Time" form. Its the cod_schedule module. Looking at the code to debug.

timwood commented 9 years ago

Looks like the PHP date extension timezone is set to UTC, which may be the cause for the time mismatch. See the Drupal PHPinfo page here (search for 'date.timezone'): https://www.drupalgovcon.org/admin/reports/status/php

The Times entity's "Date and time" field uses "Date's time zone" for "Time zone handling", which as we see above is set to UTC. See here: https://www.drupalgovcon.org/admin/conference/config/times/manage/fields/field_evttime_date

As of now, we cannot change this setting because there is already data in the MySQL table associated with this field (Drupal warns you as such when you try to change it to "Site's time zone" for example.

Looks like we could try two options for changing this php value from UTC. Modify the .htaccess or add ini_set to settings.php. I think in Acquia's environment the settings.php option is more likely to succeed. Here is a good explanation of the ways to set, albeit in reference to WAMP server. https://www.devside.net/wamp-server/setting-the-default-timezone-for-php-to-use We should probably ask Dave Stoline.

bendygirl commented 9 years ago

First off, yeah for figuring it out.

And now, to loop in David.

Sent from my iPhone

On Jun 2, 2015, at 9:27 PM, Tim Wood notifications@github.com wrote:

Looks like the PHP date extension timezone is set to UTC, which may be the cause for the time mismatch. See the Drupal PHPinfo page here (search for 'date.timezone'): https://www.drupalgovcon.org/admin/reports/status/php

The Times entity's "Date and time" field uses "Date's time zone" for "Time zone handling", which as we see above is set to UTC. See here: https://www.drupalgovcon.org/admin/conference/config/times/manage/fields/field_evttime_date

As of now, we cannot change this setting because there is already data in the MySQL table associated with this field (Drupal warns you as such when you try to change it to "Site's time zone" for example.

Looks like we could try two options for changing this php value from UTC. Modify the .htaccess or add ini_set to settings.php. I think in Acquia's environment the settings.php option is more likely to succeed. Here is a good explanation of the ways to set, albeit in reference to WAMP server. https://www.devside.net/wamp-server/setting-the-default-timezone-for-php-to-use We should probably ask Dave Stoline.

— Reply to this email directly or view it on GitHub.

timwood commented 9 years ago

Looped Dave via email as he's not part of this Git organization so I cannot @ him here.

Nneka commented 9 years ago

Thanks @timwood . I don't mind testing the change. Let me know.

unn commented 9 years ago

I am everywhere @timwood

timwood commented 9 years ago

@Nneka What is the date.timezone set to in your local environment where you did the earlier testing?

@unn ah ha! I guess I just didn't know your username.

Nneka commented 9 years ago

@timwood It's populated with nothing.

date.timezone no value no value

Using Virtualbox - Ubuntu

jonraedeke commented 9 years ago

Not sure this is the exact issue: https://www.drupal.org/node/2346603

timwood commented 9 years ago

Also relevant issues? https://www.drupal.org/node/1703332

timwood commented 9 years ago

https://www.drupal.org/node/2407607

timwood commented 9 years ago

@Nneka Did you figure out anything else with this date format issue? Jon and I think the DGC planning team can work through scheduling with the wrong times displayed if needed, but the one place that times display to public users is on the session node page. I'm going to focus on that for now.

timwood commented 9 years ago

Temporarily we could hide the session time from session node view. @jonraedeke's suggestion

timwood commented 9 years ago

We think we have a temporary fix/patch which I've uploaded to D.O. here: https://www.drupal.org/node/2407607#comment-9999695

I need to do a little more testing tomorrow before I commit this to our repo.

timwood commented 9 years ago

I believe this is now resolved in Dev, will be available on the site soon.