feat: update filename and timestamp to gmt+7
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Build Worker Base and Application Images / check-base-changes (push) Successful in 9s
				
			
		
			
				
	
				Build Worker Base and Application Images / build-base (push) Has been skipped
				
			
		
			
				
	
				Build Worker Base and Application Images / build-docker (push) Successful in 2m54s
				
			
		
			
				
	
				Build Worker Base and Application Images / deploy-stack (push) Successful in 9s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Build Worker Base and Application Images / check-base-changes (push) Successful in 9s
				
			Build Worker Base and Application Images / build-base (push) Has been skipped
				
			Build Worker Base and Application Images / build-docker (push) Successful in 2m54s
				
			Build Worker Base and Application Images / deploy-stack (push) Successful in 9s
				
			This commit is contained in:
		
							parent
							
								
									f4b898ccd1
								
							
						
					
					
						commit
						9f29755e0f
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -6,7 +6,7 @@ import json
 | 
			
		|||
import logging
 | 
			
		||||
import os
 | 
			
		||||
import cv2
 | 
			
		||||
from datetime import datetime
 | 
			
		||||
from datetime import datetime, timezone, timedelta
 | 
			
		||||
from pathlib import Path
 | 
			
		||||
from typing import Optional
 | 
			
		||||
from fastapi import WebSocket, WebSocketDisconnect
 | 
			
		||||
| 
						 | 
				
			
			@ -483,8 +483,8 @@ class WebSocketHandler:
 | 
			
		|||
            images_dir.mkdir(exist_ok=True)
 | 
			
		||||
 | 
			
		||||
            # Generate filename with timestamp and session ID
 | 
			
		||||
            timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
 | 
			
		||||
            filename = f"{display_identifier}_{session_id}_{timestamp}.jpg"
 | 
			
		||||
            timestamp = datetime.now(tz=timezone(timedelta(hours=7))).strftime("%Y%m%d_%H%M%S")
 | 
			
		||||
            filename = f"{session_id}_{display_identifier}_{timestamp}.jpg"
 | 
			
		||||
            filepath = images_dir / filename
 | 
			
		||||
 | 
			
		||||
            # Use existing HTTPSnapshotReader to fetch snapshot
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue