ݺߣ

ݺߣShare a Scribd company logo
11. 날짜 이야기




         발표자 공지훈
         sagehoon@gmail.com
시간 모듈

 타임 스탬프 : 컴퓨터에서 시간을 측정하는 방법으로 1970년 1월 1일 자정 이후
 로 초단위로 측정한 절대시간

 협정시계시 (UTC) : 1972부터 시행된 국제 표준시.

 그리니치 평균시(GMT) : 런던 그리니치 천문대의 자오선상에서의 평균 태양시

 지방 표준시 (LST) : UTC를 기준으로 경도 15도마다 1시간 차이가 발생하는 시
 간입니다. 한국은 동경 135도를 기준으로 UTC보다 9시간 빠릅니다.

 일광 절약 시간제 (DTS) : 서머타임으로 알고있는것


                                    .
վ모듈수
                                       .
            1970년 1월 1일 자정이후로 누적된 초를 float으로 반환

                Utc 기준의 현재시간
                                           .
               시스템 기준의 현재시간


                      타임스탬프를 struct_time시퀀스 객체로




           개별속성값

           개별속성값
                struct_time시퀀스객체를 지정된 형태로 변환

              struct_time시퀀스 객체를 타임스탬프 값으로 변환
10초간 sleep하는 예제
Strptime(), strftime()메서드
날짜시간(datetime) 모듈
 Class datetime.date 일반적으로 사용되는 그레고리안 달력의
 년월일을 가리킨다.

 Class datetime.time 시간을 시,분,초, 마이크로초 시간대로 나타
 냅니다.

 Class datetime.datetime date클래스와 time클래스의 조합으로
 년,월,일,시,분,초, 마이크로초 시간대 정보를 나타냅니다.

 Class datetime.timedelta 두날짜 혹은 시간사이의 기간을 표현
 합니다.
Date 클래스 생성자와 클래스 메서드 예


                      년월일을 입력하여 date객체 생성


                        2월은 28일인데 넘어가서




                                 d a t e 객체 생성
                                 타임스
                 오늘날짜의 date객체
                 생성




                                         탬프로
date객체의 속성예제




                   struct_time시퀀스 객체를 반환


           1.1.1이후로 현재까지 누적 날짜 반환

          월요일이라서 0 반환 화는 1 수는 2 일
          은6
time객체 생성 예제
datetime객체 생성 예제
datetime클래스를 다른형식으로 변환메서드
datetime클래스 출력과 관련된 메서드
پٲ클래스

               3일이전

               7시간이후
Timedelta 연산

                    현재로부터 7시간이후

                    현재로부터 3일전

                    두 timedelta객체의 합
                    7시간 = 25200초
                    두 객체의 차



                 28시간 = 1일 4시간 = 1일 14400초



               기간의 절대값
Timedelta의 boolean연산
Timedelta 객체 비교연산- timedelta,date
timedelta와 datetime
Q&A
감사니다.

More Related Content

Featured (20)

2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing
Search Engine Journal
Storytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design ProcessStorytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
OECD Directorate for Financial and Enterprise Affairs
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
SocialHRCamp
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing
Search Engine Journal
Storytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design ProcessStorytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
SocialHRCamp
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray

Python3 11장 날짜이야기

  • 1. 11. 날짜 이야기 발표자 공지훈 sagehoon@gmail.com
  • 2. 시간 모듈 타임 스탬프 : 컴퓨터에서 시간을 측정하는 방법으로 1970년 1월 1일 자정 이후 로 초단위로 측정한 절대시간 협정시계시 (UTC) : 1972부터 시행된 국제 표준시. 그리니치 평균시(GMT) : 런던 그리니치 천문대의 자오선상에서의 평균 태양시 지방 표준시 (LST) : UTC를 기준으로 경도 15도마다 1시간 차이가 발생하는 시 간입니다. 한국은 동경 135도를 기준으로 UTC보다 9시간 빠릅니다. 일광 절약 시간제 (DTS) : 서머타임으로 알고있는것 .
  • 3. վ모듈수 . 1970년 1월 1일 자정이후로 누적된 초를 float으로 반환 Utc 기준의 현재시간 . 시스템 기준의 현재시간 타임스탬프를 struct_time시퀀스 객체로 개별속성값 개별속성값 struct_time시퀀스객체를 지정된 형태로 변환 struct_time시퀀스 객체를 타임스탬프 값으로 변환
  • 6. 날짜시간(datetime) 모듈 Class datetime.date 일반적으로 사용되는 그레고리안 달력의 년월일을 가리킨다. Class datetime.time 시간을 시,분,초, 마이크로초 시간대로 나타 냅니다. Class datetime.datetime date클래스와 time클래스의 조합으로 년,월,일,시,분,초, 마이크로초 시간대 정보를 나타냅니다. Class datetime.timedelta 두날짜 혹은 시간사이의 기간을 표현 합니다.
  • 7. Date 클래스 생성자와 클래스 메서드 예 년월일을 입력하여 date객체 생성 2월은 28일인데 넘어가서 d a t e 객체 생성 타임스 오늘날짜의 date객체 생성 탬프로
  • 8. date객체의 속성예제 struct_time시퀀스 객체를 반환 1.1.1이후로 현재까지 누적 날짜 반환 월요일이라서 0 반환 화는 1 수는 2 일 은6
  • 13. پٲ클래스 3일이전 7시간이후
  • 14. Timedelta 연산 현재로부터 7시간이후 현재로부터 3일전 두 timedelta객체의 합 7시간 = 25200초 두 객체의 차 28시간 = 1일 4시간 = 1일 14400초 기간의 절대값
  • 18. Q&A