Birthday Block changes dates and "no birthdays, today"

Birthday Block changes dates and "no birthdays, today"

by Gerardo Rodrigues -
Number of replies: 15

Hi everybody,

I'm having a problem. Using recently installed fresh v 2.6.4 every time I insert a users birthday in the profile, the system changes it to a day before and in the front page it always says "No birthdays today". in order toappear a birthday today, i have to input a users birthday 2 days ahead of today.

How can this be?



Thanks,


Gerardo Rodrigues
Moodle (unchanged) 2.6.4
www.academiastellamaris.pt


Average of ratings: -
In reply to Gerardo Rodrigues

Re: Birthday Block changes dates and "no birthdays, today"

by Guillermo Madero -
In reply to Guillermo Madero

Re: Birthday Block changes dates and "no birthdays, today"

by Gerardo Rodrigues -

Hi Guillermo,


Thanks for your reply. Everything does look ok. Can't figure out what's wrong.


I'm bumped...

In reply to Gerardo Rodrigues

Re: Birthday Block changes dates and "no birthdays, today"

by Guillermo Madero -

It sounds like some daylight time-saving adjustment. Have you checked the unix timestamp value? Maybe it was created with the "wrong" timezone.

http://www.epochconverter.com

In reply to Guillermo Madero

Re: Birthday Block changes dates and "no birthdays, today"

by Gerardo Rodrigues -

How/where can I adjust it?


Thanks Guillermo.

In reply to Gerardo Rodrigues

Re: Birthday Block changes dates and "no birthdays, today"

by Guillermo Madero -

Hello Gerardo,

I don't know how you converted your times but at the page I referenced there's a dropdown list where you can choose between GMT and Local time. As the Unix timestamp is always assumed to be UTC/GMT, you need to convert your Human dates using the GMT option. For example:

If I convert my current local time (11:40 AM GMT-5) using the GMT option, I get the following:

Epoch timestamp: 1411749600
Timestamp in milliseconds: 1411749600000
Human time (GMT): Fri, 26 Sep 2014 16:40:00 GMT
Human time (your time zone): 9/26/2014 11:40:00 AM

But if I convert it using Local time, then I get:

Epoch timestamp: 1411767600
Timestamp in milliseconds: 1411767600000
Human time (your time zone): 9/26/2014 4:40:00 PM
Human time (GMT): Fri, 26 Sep 2014 21:40:00 GMT

As you can see, the timestamp value is quite different (five hours, given my timezone: GMT-5).

So, you only need to make sure that the time settings of your computer are correct and select the GMT option during the Human date/Unix timestamp conversion.

--- Reference

http://www.epochconverter.com

What is epoch time?
The Unix epoch (or Unix time or POSIX time or Unix timestamp) is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT)
In reply to Guillermo Madero

Re: Birthday Block changes dates and "no birthdays, today"

by Gerardo Rodrigues -
Then where do I insert the result of the unix/timestamp conversion?

I contacted the hosting admin at hostgator and they inserted a php.ini file with my location (Europe/Lisbon), but all is the same.

This is exactly what happens:

I have to insert the users date of birth 2 days ahead, cause the system automatically removes one day, and the birthday block shows "Todays Birthdays" as the ones with tomorrows date. Get it?

See today is september 30th. In order for a user to appear on "Todays Birthdays" I have to input October 2nd as his date of birth in his profile, so the system would automatically (as soon as I hit save) change it to october 1st, and the birthday block will show it as todays birthday (even though today is still the 30th/September). This is way more than a simple timezone adjustment, no?

thoughtful
In reply to Gerardo Rodrigues

Re: Birthday Block changes dates and "no birthdays, today"

by Guillermo Madero -

Hello Gerardo,

Yes; there might be more than that. I just looked for the plugin:

https://moodle.org/plugins/view.php?plugin=block_birthday

and I see that it says:

Birthday Block for Moodle 2.0 (and beyond)

but then the "latest release" message stops at the 2.3 version:

This is the latest release for Moodle 2.3

Maybe the plugin needs to be updated for the latest Moodle releases? You could try and contact the author (Anthony Burrow) directly or by posting at the General plugins forum, just as he recommends:

The best place for questions is in the Contributed plugins forum - http://moodle.org/mod/forum/view.php?id=44

Other than that, I guess that you would need to start debugging by looking directly at plugin code and at the values saved at the database.

---

@moderators. Could this thread be moved to the General plugins forum?

In reply to Guillermo Madero

Re: Birthday Block changes dates and "no birthdays, today"

by Gerardo Rodrigues -

That's probably it, but I didn't install any extra plugin with Moodle.

The Birthday block comes already with Moodle 2.6.4, so if nobody else complains about it, how can it be a problem with the plugin?

It's weird, hehe.

Thanks Guillermo.  wink

In reply to Gerardo Rodrigues

Re: Birthday Block changes dates and "no birthdays, today"

by Guillermo Madero -

Mh? What birthday clock? I've never heard of that as being part of the Moodle core wide eyes

The standard Edit profile page doesn't have any "birthday" field, as you may confirm at the Moodle sandbox:

http://demo.moodle.net

no birthday block in standard Moodle

So, check your plugin page:

  • Administration > Plugins > Plugins overview
  • Administration > Plugins > Blocks > Manage blocks

to confirm about this being a plugin issue. I still think this has to do with the Birthday block plugin:

https://moodle.org/plugins/pluginversion.php?id=1142

 

---

And you needn't open a new thread, as this one has already been moved to the Plugins forum smile

In reply to Guillermo Madero

Re: Birthday Block changes dates and "no birthdays, today"

by Gerardo Rodrigues -
Maybe I am mistaken, and I did install the Birthday plugin. I was sure it came with 2.6.4. ok.

Anyway, I hope anyone can help me here.
In reply to Gerardo Rodrigues

Re: Birthday Block changes dates and "no birthdays, today"

by Guillermo Madero -

Try and message the author.

In reply to Guillermo Madero

Re: Birthday Block changes dates and "no birthdays, today"

by Wendi Daniels -

I am having the exact same problem, and no plugins were installed for birthdate. It's not a timezone issue. Did this issue ever resolve? If so, how did you fix it?

In reply to Wendi Daniels

Re: Birthday Block changes dates and "no birthdays, today"

by Wendi Daniels -

It's a bug that was fixed...   https://tracker.moodle.org/browse/MDL-46676

In reply to Wendi Daniels

Re: Birthday Block changes dates and "no birthdays, today"

by Wendi Daniels -

So Guillermo, the tracker says that Moodle 28 was affected, but that was back in August. How can I find out if this has been fixed in 2.8.3? I imagine it has been, as I can't believe they would not have fixed it, but still, I need to know how I can be sure, as I need to upgrade this soon.