Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@msng
Created November 3, 2012 07:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msng/4006419 to your computer and use it in GitHub Desktop.
Save msng/4006419 to your computer and use it in GitHub Desktop.
「PHP祭り2日目の会場地点での、日の出の時刻は何時何分何秒でしょう?」への解答を示す PHP スクリプト
<?php
$timestamp = strtotime('2012-11-04');
$format = SUNFUNCS_RET_TIMESTAMP;
$latitude = 33.590383;
$longitude = 130.423992;
$sunriseTimestamp = date_sunrise($timestamp , $format, $latitude, $longitude);
$sunriseDateTime = date('H:i:s', $sunriseTimestamp);
echo $sunriseDateTime; //06:40:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment