UMass Drupal User's Group meeting - Thu, Nov 1

Events happening in the community are now at Drupal community events on www.drupal.org.
druderman's picture
Start: 
2012-11-01 14:00 - 15:30 America/New_York
Event type: 
User group meeting

Our regular meetings are the first Thursday of the month.

This Users Group meeting is Thursday, Nov 1, 2-3:30pm in ISB 145.

The meeting is at the UMass Integrated Sciences Building (ISB) (See map here or see description of the building here.)
Room 145 is a meeting room near the elevators on the first floor.

Agenda:
- Introductions
- Drush: Gary
- Other topics: discussion, problems, show and tell, etc.

Please use the 'Signup' feature on this events page for a reminder.

Comments

Drush Resources

gp177's picture

Below are some of the resources I'll either be touching on may be usefull in getting to know Drush:

Project Pages
http://drupal.org/project/drush
http://drush.ws

Tutorials
http://drupalize.me/videos/installing-drush-nix
http://drupalize.me/videos/what-drush (OS X client)
http://www.ostraining.com/blog/drupal/drush/ (windows client)

The php time bug from our meeting

Maestro232's picture

Hello All,

For any interested, here's what the time bug was about that I mentioned in the meeting. I was making the following call somewhere in my code:

$timestamp = mktime($hour, $minute, $second, $month, $day, $year);

The parameters you see were pulled from user's Drupal form input. Now, given the purpose of this form, the user sets a certain time (for campus opening or closing). Daylight savings time is irrelevant. The user is not even thinking about it. If they enter 10am they want it to say 10am.

Well, it turns out that mktime() tries to do some DST handling in the background. There is an optional parameter in that function is_dst that is -1 by default, which means the system should try to figure it out. So what was happening is the user put 10:00am in, but after mktime() ran it decided that, being in DST it should add an hour to the time that was entered. Stupid, stupid php!!

Well, if I explicitly set is_dst to 1, I tell it it's in DST and if I set it to 0 I tell it it's not in DST. As it turns out date('I') is a boolean that detects DST.

Here's the thing. If I set is_dst = 1 I am telling the function that we are in DST. In that case it doesn't shift the time on me. This seems to be the opposite behavior of setting it to -1 and letting the system decide. Maybe I'm missing something. Anyway, it seems that it's working to do the following:

$timestamp = mktime($hour, $minute, $second, $month, $day, $year, date('I'));

That last is_dst parameter will dynamically set now. It is working at the moment, but I'm wondering if it will still handle things correctly when DST ends this weekend.

Stupid, stupid php!! Just make the stupid time I give you. Arggggg!

I've had luck not setting the

druderman's picture

I've had luck not setting the timezone for the site. Basically, so there should be no time zone conversion.

See this:
http://drupal.org/node/767182

You could try this on a test site and see.

Minutes

limako's picture

UDU 2012-11-01

Attendance

Gary Parker
Chris Hoogendyk
Steven Brewer
Beth Armour
Adam Black
Johanna Bates
Brian Devore
Sarah Harvey
Joe Hessian
Nate Develder
Dave Ruderman
Gail Parsloe
Matthew Sharff

Gary Parker: Introduction to Drush

Topics

date/time bug:

new UMass Events site

Apache solr

western mass drupal camp Jan 19 (jan 26 snow date)

drupalcon portland: may 20-24

drupal workshops
local sandboxes in computer lab
laptops?

3rd thursday of month?

Future topics:
theme layer (Johanna?)
drupal8 and twig
adaptive themes
different themes
editorial management
organizational structure
drupal security
profiles
upgrading 6 -> 7 -> 8
performance
media management (front end, back end)
data migration
feeds

UMass Amherst User's Group

Group categories

Tags

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week