I am pretty comfortable to say now that it is based on GMT.
Wikipedia Anniversaries is my second PHP project and I can tell you that it’s pretty simple – it leech data directly from Wikipedia front page. Date is based on UTC time. I’ll try to fix that but can’t promise anything.
Hi Piotr
Thanks for your brilliant response. OK, it does use UTC. I have had a look at the Wikipedia Home Page and I was thinking that it is a very short list compared to what is on the page for the date that it links to, and then I realised that the wording on the events is not always the same, so I concluded that there must be another source.
Then I found this page, and I take it that there will be one for each month and it seems that this is where the Wikipedia home page feeds the information from.
http://en.wikipedia.org/wiki/Wikipedia:Selected_anniversaries/December
If you could identify the date on the site, then maybe you could retrieve the information correct for the day. Thankyou for a great little plugin, and I hope my bumbling little research helps.
Regards
Hi Philip and thank you for your research help. You are right – Wikipedia feeds the information from another source. The problem is that I need to write another, totally different plugin to retrieve the information correct for the day (not it UTC time). I’ll try to do that in near future, but it’s not easy quest for a beginner programmer like me š
Regards
PS
I guess that this site is perfect for Australia: http://www.today.wmit.net.au/ š
Hi Piotr
It is all good, I am a bit of a beginner to. I think the first task is to find the date on the website, and then wikipedia don’t make it easy as the information is on 12 different pages. I really like what you have done. Thankyou very much. Thankyou for the link as well, though I think it is a little more proprietary.
I am a total beginner right now! š Thanks for your feedback but now I know that date selection is something really big, great for another plugin or huge update for this one. I really don’t have time (and knowledge) for something like this now, but maybe in near future, who knows.
Thank you again for using it!
Ok, now plugin supports server local time. Hope it works.
Hi Piotr
That is great, thought I will watch it at different hours to ensure.
Perhaps we could head the widget <?php echo date_i18n(' jS F '); ?> or some such similar on the output
Hi Piotr
I can now confirm that we are not quite there yet, and I think I know part of the issue, so I will communicate later (next few days) when I have time to put it together.
Hello Philip
Thank you very much for tests, let me know about everything when you put it together.
Hi Piotr
The Date
In order to retrieve the date you will need to use ‘date_i18n’ as this will retrieve the date that is set for the WordPress site in the WordPress settings. It may look something like this
<?php date_i18n('F_j'); ?>
Page Source
The page you need to harvest the information from will then need to be a constructed url. Using the Wikipedia selected anniversaries url followed by the constructed Date as MonthName + _ + Day
https://en.wikipedia.org/wiki/Wikipedia:Selected_anniversaries/ + <?php date_i18n('F_j'); ?>
so it will look more like this
https://en.wikipedia.org/wiki/Wikipedia:Selected_anniversaries/June_30
I am not sure what that does to other languages, but the benefit is that for the 11 hours of the day that we are on the day before London and Paris we will still see the information in relation to our day. I hope that makes sense.
Thanks for the good work. Regards
Hello Philip
thank you for tests. I know what to do right now, but the key was a current_time function. Tested it, and I think it’s works pretty good now – reacts for the blog’s current local time. Test it again and plz let me know š
Regards!
Thanks Piotr
My tests suggest that it is now owrking correctly
Great news Philip! Thank you again for your tests.
Regards