The calculation needed to be done on the backend on the server, which is written in Perl. This page had a suggestion how to get the number of seconds so far elapsed in the day, which could easily be modified to instead give me the number of seconds remaining. Problem: I want to calculate on the basis of the local time zone not UTC/GMT. Thankfully, using Perl’s
DateTime object, that isn’t difficult:
use DateTime; my $tomorrow = DateTime->now(time_zone => $timeZone); my $secs = ((23 - $tomorrow->hour) * 3600) + ((59 - $tomorrow->min) * 60) + (59 - $tomorrow->sec); $tomorrow->add( seconds => ($secs + 1) ); my $tomorrowStarts = $tomorrow->epoch;
With that little code snippet,
$tomorrowStarts will return the first second of tomorrow located to
$timeZone and relative to the Epoch.
As we live as Christians, we face struggles and opposition. Shouldn’t life be easier? Should we find a way to make it easier?
I turn to Psalms 16-18 that point us to the lasting treasure of God’s love on tonight’s “This Week at Little Hills.”
Sometimes the deck appears to stacked and it’s hard to see how life will do anything but go from bad to worse. How do we have joy then?
Join us as the Psalminizers come together for a discussion about the problems of life and the solution in Psalms 13-15.
As we think about joy in dark places, Paul turns to those who are actually preaching the Gospel with the aim of discrediting him. What do we do when people and circumstances seem to want to hurt us?
I meant to post this link ahead of Christmas, but it is still the 12 Days of Christmas, so…
The Zippy Crew takes you over the river and through the woods with a review of a fantastic new Nat “King” Cole Christmas album, sharing of Christmas memories and reflections on the upcoming 12 Days of Christmas. Also, Special Guest Jim Krenning joins us for a preview of an adventure through the Psalms in the New Year.
This episode was so much fun. I hope you enjoy it!
So Christmas is over, right? Not so fast! Traditionally the Church celebrated the joy of Jesus’s birth in the days after Christmas and after a hard couple of years, there are some very good reasons from God’s Word to pick that tradition up.
Merry Christmas! I love the 12 Days of Christmas as those who follow this blog know well. And, as has become my tradition, I have a new little devotional booklet to share with you in case you’d like to observe those wonderful days between Christmas and Epiphany with me:
During Advent, we all excitedly look towards celebrating Jesus’s birth. However, suddenly it is December 26 and the world resets to its ordinary preoccupations. That’s what is wonderful about observing the Twelve Days of Christmas: it helps us keep reflecting on God’s grace and the miracle of Christmas after the busyness of Christmas Day is past. Tim Butler has prepared a free devotional booklet for these next twelve days.
You can download Because of Christmas for free to begin this year’s devotional journey. There’s a companion Facebook Event where you can leave comments and I’ll be posting some additional reflections.
You can also purchase print or Kindle copies at Amazon (Affiliate Link) if you’d like. I mostly put it on Amazon to reach people who don’t know me and thus might stumble across it there while looking for something to celebrate Christmas with, but the link is there if you want it in those formats.
Join us as Little Hills celebrates Christmas Eve! During the service we will share in the culmination of our journey through the Spirit’s Work at Christmas that we have been exploring over Advent. Jim Krenning, Joyce Neikirk and I will share from God’s Word and Melanie Haynes will lead us in a Christmas carol to celebrate that our Savior is born!