src/Marando/AstroDate/AstroDate.php
public static function now($timezone = null)
    {
        // Get current time as micro unix timestamp
        $now   = explode(' ', microtime());
        $unix  = $now[1];
        $micro = Time::sec($now[0]);

        // Compoute JD from unix timestamp
        $jd = ($unix / 86400.0) + static::UJD;

        // Add timezone if none present
        if ($timezone == null) {
            $timezone = TimeZone::UTC();
        }
        if (is_string($timezone)) {
            $timezone = TimeZone::parse($timezone);
        }

        // Return the new date adding the micro portion and provided timezone
        return static::jd($jd)->add($micro)->setTimezone($timezone);
    }
public static function now($timezone = null)
    {
        // Get current time as micro unix timestamp
        $now   = explode(' ', microtime());
        $unix  = $now[1];
        $micro = Time::sec($now[0]);

        // Compoute JD from unix timestamp
        $jd = ($unix / 86400.0) + static::UJD;

        // Add timezone if none present
        if ($timezone == null) {
            $timezone = TimeZone::UTC();
        }
        if (is_string($timezone)) {
            $timezone = TimeZone::parse($timezone);
        }

        // Return the new date adding the micro portion and provided timezone
        return static::jd($jd)->add($micro)->setTimezone($timezone);
    }
Creates a new AstroDate from the current date and time

@param  TimeZone|string $timezone

@return static