Some more PBP code: http://www.picbasic.co.uk/forum/showthread.php?t=20178
and a (stupid?) project: http://www.picbasic.co.uk/forum/showthread.php?t=20083
For time service the easy way I found was to put a dead simple web page on my Windows Home Server
default.aspx:
Code:
<%
response.write("*" & Format(now, "yyyy-MM-dd HH:mm:ss") & "J")
select case Format(now, "ddd")
case "Sun"
response.write("1")
case "Mon"
response.write("2")
case "Tue"
response.write("3")
case "Wed"
response.write("4")
case "Thu"
response.write("5")
case "Fri"
response.write("6")
case "Sat"
response.write("7")
case else
response.write("0")
end select
response.write("*" & VbCrLf)
'response.write("*" & Format(now, "yyyy-MM-dd HH:mm:ss ddd") & "<BR>")
'response.write("*" & Format(dateadd("d", 1, now), "yyyy-MM-dd HH:mm:ss ddd") & "<BR>")
'response.write("*" & Format(dateadd("d", 2, now), "yyyy-MM-dd HH:mm:ss ddd") & "<BR>")
'response.write("*" & Format(dateadd("d", 3, now), "yyyy-MM-dd HH:mm:ss ddd") & "<BR>")
'response.write("*" & Format(dateadd("d", 4, now), "yyyy-MM-dd HH:mm:ss ddd") & "<BR>")
'response.write("*" & Format(dateadd("d", 5, now), "yyyy-MM-dd HH:mm:ss ddd") & "<BR>")
'response.write("*" & Format(dateadd("d", 6, now), "yyyy-MM-dd HH:mm:ss ddd") & "<BR>")
'response.write("*" & Format(dateadd("d", 7, now), "yyyy-MM-dd HH:mm:ss ddd") & "<BR>")
%>
Web.Config:
Code:
<?xml version="1.0"?>
<configuration>
<appSettings/>
<system.web>
<compilation debug="true"/>
<customErrors mode="Off"/>
<authentication mode="Windows"/>
<identity impersonate="true"/>
<httpRuntime enableVersionHeader="false" />
</system.web>
</configuration>
and the response is:
Code:
*2015-11-13 10:05:40J6*
The "J" in the response means "Jour" (french word = "day").
If you find de way to call a SNTP server with PBP please share!
Bookmarks