We have a date field and is populated via before save script to datetime/today(). At around 10:43 pm EST (or near time and after), when the script is triggered, the date field is updated to TOMORROW instead of TODAY. The modified date/time correctly shows as Today10:43 pm. The user and the system time zone is set to EST(New York time zone). 
							
						
					datetime/today() populates tomorrow date at some time of day
				
					Collapse
				
			
		
	X
- 
	
	
	
	
		
	
	
	
		
	
	
	
	
	
	
	
	
	Tags: None
- 
	
	
	
	
		
	
	
	
		
	
		
			
				
	
	
	
	
	
	
	
	
	
 The function returns UTC today. Maybe we need to change it to honor a time-zone but it would be in a minor release I think.
 
 As a workaround you can use datetime\now(), then convert to a timezone, then split the date part.If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.
- 
	
	
	
	
		
	
	
	
		
	
		
			
				
	
	
	
	
	
	
	
	
	

Comment