Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Trouble reading modified date from network share

 
Ranch Hand
Posts: 35
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I resolved the problem I had with reading and writing JSON files from a network share, but then I ran into a problem with reading the modified date of a network shared file.
I researched the required code and came up with the following but the file date always ends up 0.
Here is the actual output on the console:
smb://nsp.local/pi/sprinkler/status.json pi 0

Can someone help me understand what is wrong?

 
Sheriff
Posts: 3108
459
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This doesn't answer your Mac-specific question, but if I run your code on a Windows platform, the date does get reported properly.
 
Ron McLeod
Sheriff
Posts: 3108
459
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Works on Mac 10.11.6 as well
 
Mike Gauthier
Ranch Hand
Posts: 35
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got this working.  I had been working on the schedule.json file for 7-8 days and when I started working on the status file I used status.json.  Problem is, the file name is actually status.txt!

I changed it and all is well now.

I thought everything was okay because there was no error being thrown. Guess that's normal for file not found with the modified date call.

 
Let's get him boys! We'll make him read this tiny ad!
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic