Skip to content

Instantly share code, notes, and snippets.

View l1n's full-sized avatar

Nova l1n

View GitHub Profile
@l1n
l1n / email-message.js
Created October 13, 2017 20:49 — forked from patrickcoombe/email-message.js
JSON-LD markup for rich email messages
<script type="application/ld+json">
{
"@context":"http://schema.org",
"@type": "EmailMessage",
"description": "View this Pull Request on GitHub",
"action": {
"@type": "ViewAction",
"url":"https://github.com/perma-id/w3id.org/pull/47",
"name":"View Pull Request"
}
from datetime import datetime
from math import *
#result in hours
def get_LST(datestr,long):
dt1 = datetime.strptime(datestr,"%Y %m %d %H %M %S")
dd=dt1-datetime(2000,1,1,0,0,0)
utc = dt1.hour+dt1.minute/60.0+dt1.second/(3600.0)
return ((100.46+0.985647*dd.total_seconds()/(86400.0)+long)/15.0 +utc)%24