<p>애들이 어린 초등학교 시절 한컴타자속도 100타 단위 당 용돈을 주기로 했습니다.</p> <p>100타 : 만원, 200타 : 2만원, 300타 : 3만원 이런식으로 설정하고</p> <p>짧은글 5회 연속에서 달성하면 지급하였습니다.</p> <p> <br></p> <p>둘째는 조금 연습해보다 포기하여 도전조차 안하고 첫째는 중간 중간 몇번의 시도에서 실패한적도 있지만 300타 까지 달성하여 받아 갔지요.</p> <p>저의 경우엔 키보드 위치가 암기되지 않으면 300타 달성이 어려웠던 기억이 있어 딱 300타 정도까지만 설정했습니다.</p> <p>요즘은 게임할때 해드셋 끼고 음성으로 하는걸보니 굳이 용돈줘가며 괸히 시켰단 생각이.....</p> <p> <br></p> <p>암튼 이제 와이프님의 퀘스트를 해야 합니다. </p> <p> <br></p> <p>컴퓨터 사용 시간 통제 개발하기1 에서 개발한 소스는 단순 시스템 시간을 가저와 체크 합니다.</p> <p>두가지 결함이 존재하는데 하나는 윈도우에서 시간을 변경하거나, 표준시간대를 변경하면 시간이 변경되어</p> <p>무력화 됩니다.</p> <p> <br></p> <p>이제 서버 타임으로 체크를 하여야 하겠다고 생각하고, </p> <p>서버가 없는데 이 시간을 어떻게 받아 올까 고민해 봅니다. 회사서버를 쓰면 법적으로 차후 곤란해지니 이건 제외 하고, </p> <p>잠간의 검색으로 생각보다 간단한 방법을 찾습니다. </p> <p>http의 헤더에 해당 서버의 시간정보가 있어 이걸 이용하기로 합니다. 네이버 고맙다.!!</p> <p> <br></p> <p>네트워크가 죽은 상태에서는 표준시간대 변경하는 경우에 대하여도 차단해야 하지요. 네이버가 장애가 발생할수도 있구요. </p> <p>시간을 변경하면 무력화 할수 있지만 요즘은 온라인게임이 거의 주력이라 </p> <p>첫째가 오프라인 게임을 밤 세워가며 즐길일 없기에 시간제어는 이정도면 안심해도 될것 같습니다.</p> <p> </p> <p> </p> <p>소스코드(VB)</p> <p> <br></p> <p> <img src="https://thimg.todayhumor.co.kr/upfile/202509/1758772549a17c4d9c82eb45d994ea1b81c93b8f5d__mn808281__w421__h243__f14028__Ym202509.jpg" alt="win001.jpg" style="width:421px;height:243px;" filesize="14028"></p> <p>label1 은 네이버의 서버타임을 출력하고</p> <p>label2 는 시스템의 한국표준시간을 출력합니다.</p> <p> <br></p> <table bgcolor="#ffcccc" cellpadding="1" cellspacing="0" style="border-spacing:0px;border-collapse:collapse;background-color:transparent;border-color:#000000;border-style:solid;border-width:1px;width:721.797px;"><tbody><tr><td style="line-height:21.6px;padding:0px;border-style:solid;border-width:1px;border-color:#000000;"> <span style="font-size:9pt;"> </span> <p style="margin-bottom:10px;"> <span style="font-size:12px;">Imports System.Net</span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;">Public Class Form1</span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"> Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load</span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"><br></span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"> Try</span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"> Dim wc As New WebClient()</span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"> Dim url As String = "<a target="_blank" href="https://www.naver.com" target="_blank">https://www.naver.com</a>"</span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"><br></span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"> wc.DownloadString(url) ' 요청을 보내 응답 헤더를 받음</span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"><br></span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"> Dim dateHeader As String = wc.ResponseHeaders("Date")</span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"> If Not String.IsNullOrEmpty(dateHeader) Then</span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"> Dim serverTime As DateTime = DateTime.Parse(dateHeader)</span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"> Label1.Text = serverTime</span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"> Else</span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"> Label1.Text = "HTTP 응답에 Date 헤더가 없습니다."</span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"> End If</span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"> Catch ex As Exception</span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"> Label1.Text = "오류: " & ex.Message</span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"> End Try</span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"><br></span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"> Dim localTime As DateTime = DateTime.Now ' PC 타임</span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"> Dim koreaTimeZone As TimeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById("Korea Standard Time") '한국표준시간.</span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"> Dim koreaTime As DateTime = TimeZoneInfo.ConvertTimeFromUtc(TimeZoneInfo.ConvertTimeToUtc(localTime), koreaTimeZone) '로컬시간을 한국표준시간으로 변경</span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"> Label2.Text = koreaTime</span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"><br></span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"> End Sub</span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;"><br></span> </p> <p style="margin-bottom:10px;"> <span style="font-size:12px;">End Class</span><span style="font-size:9pt;background-color:transparent;color:#333333;"> </span> </p> </td> </tr></tbody></table><br><p> <img src="https://thimg.todayhumor.co.kr/upfile/202509/1758772662f03c2a6ab77a4396a47f976de60c2f00__mn808281__w350__h176__f7724__Ym202509.jpg" alt="win002.jpg" style="width:350px;height:176px;" filesize="7724"></p><p> <span style="color:#000000;font-size:13px;">실행후 확인이 됩니다.</span> </p> <p> <br></p> <img src="https://thimg.todayhumor.co.kr/upfile/202509/1758772707cf73417876f14b9e933be6da2da73cbb__mn808281__w204__h192__f10890__Ym202509.jpg" alt="easy.jpg" style="width:204px;height:192px;" filesize="10890">
댓글 분란 또는 분쟁 때문에 전체 댓글이 블라인드 처리되었습니다.